raw-input Questions

1

Solved

I am trying to detect a KeyboardInterrupt exception when CTRL-C is pressed during a raw_input() prompt. Normally the following code works just fine to detect the command: try: input = raw_input("...
Lailaibach asked 14/7, 2014 at 12:35

4

I want to do a raw_input('Enter something: .'). I want it to sleep for 3 seconds and if there's no input, then cancel the prompt and run the rest of the code. Then the code loops and implemen...
Fenske asked 12/8, 2010 at 19:48

1

I used an online interpreter to run this code: print "How old are you?", age = raw_input() print "How tall are you?", height = raw_input() print "How much do you weigh?&quo...
Rojas asked 15/4, 2014 at 9:16

1

Solved

For starters, I'm on python 2.7.5 and Windows x64, my app is targeted at those parameters. I'm in need of a way to cancel a raw_input after a certain amount of time has passed. Currently I have my...
Colorless asked 18/10, 2013 at 17:10

4

Say I want to use raw_input like this: code = raw_input("Please enter your three-letter code or a blank line to quit: ") under: if __name__=="__main__": How can I let it repeat multiple time...
Sunken asked 23/11, 2009 at 6:36

2

Solved

Suppose I need to replace the raw_input function in the following code with a wxPython dialog box that asks for user input and returns the value to program: ... x = raw_input("What's your name?") ...
Flybynight asked 30/8, 2013 at 12:22

1

I want to hide my password but I don't know how. I have seen show="*" and also getpass but I don't know how to place them into this code. I'm using Python 2.7.3 and coding on a Raspberry Pi. ...
Electrolysis asked 17/8, 2013 at 15:24

1

Solved

I have a Logitech G500 gaming mouse that is running at its full DPI of 5700. I'm trying to write a program in C++ that accurately measures horizontal movement of the mouse in physical units, ie. c...
Malamud asked 16/3, 2013 at 23:21

2

I need something like raw_input, but without displaying the text you are typing. Also I tried getpass, but it still displays what I just typed.
Credo asked 5/5, 2013 at 2:59

3

Solved

Currently, I'm making a program that intercept keystrokes from a specific keyboard (filtered using its HID). So to know which keystrokes have been sent by a specific device, I used the RawInput tec...
Deservedly asked 25/10, 2012 at 19:45

3

Solved

How can I have Python move to the top of an if statement if no condition is satisfied correctly. I have a basic if/else statement like this: print "pick a number, 1 or 2" a = int(raw_input("> ...
Promisee asked 10/10, 2012 at 21:34

1

Solved

i am trying to send a WM_INPUT-message to an application, but i encounter a few hurdles which i fail to solve. I've created the RAWINPUT-structure like the following: //try sending 'W' RAWINPUT r...
Enlil asked 25/9, 2012 at 19:55

2

Is there a way to ignore newline characters in data entered through raw_input? I am trying to use raw_input to input a list of strings that are copied and pasted from a spreadsheet. the problem is ...
Snowblind asked 28/1, 2012 at 17:34

4

Solved

I'm trying to let the user input commands at a console using raw_input(), this works fine. The problem is I have background threads that occasionally output log-information to the screen and when t...
Haye asked 17/1, 2010 at 19:55

2

Solved

I have a GUI program which should also be controllable via CLI (for monitoring). The CLI is implemented in a while loop using raw_input. If I quit the program via a GUI close button, it hangs in ra...
Helvetii asked 4/1, 2011 at 8:55

3

Solved

I'm writing a little CLI in Python (as an extension to Mercurial) and would like to support tab-completion. Specifically, I would like catch tabs in the prompt and show a list of matching options (...
Leaseback asked 12/1, 2010 at 1:11

© 2022 - 2024 — McMap. All rights reserved.