The raw input API provides a stable and robust way for applications to accept raw input from any HID (Human Interface Devices), including the keyboard and mouse.
Questions tagged [raw-input]
623 questions
3
votes
3 answers
How to read multiple lines input in python
I am new to Python and I was trying to workout an interviewstreet problem of Kingdom Connectivity. Although, I managed to solve the problem, I'm having trouble giving input of the given format, I've tried my solution on my system and the output is…

sum2000
- 1,363
- 5
- 21
- 36
3
votes
2 answers
How to do other stuff while user deciding if write anything in raw_input?
while True:
mess = raw_input('Type: ')
//other stuff
While user doesn't type anything, I can't do //other stuff. How can I do, that other stuff would be executed, but, if user types anything at that time, mess would change its value?

good_evening
- 21,085
- 65
- 193
- 298
3
votes
1 answer
nose test freezing at raw_input
I have a nose test that imports a file which runs a class with raw_inputs. Whenever I type nosetests in the command line, the prompt simply pauses and doesn't continue - I have to keyboard interrupt to see what happens, and it turns out the nose…

Intenex
- 1,907
- 3
- 20
- 33
3
votes
1 answer
raw_input recognizes ^? but not ^H
I'm trying to get the backspace key to work in a python script that I have. Basically, the code in the script looks something like:
print("Please type the character 'h':")
choice = raw_input()
if choice == 'h':
print("Thanks.")
else:
…

jwir3
- 6,019
- 5
- 47
- 92
3
votes
3 answers
raw_input and print in a thread
I have a thread which can print some text on the console and the main program have a raw_input to control the thread.
My problem is when I'm writing and the thread too I get something like this:
-->whatiwWHATTHETHREADWRITErite
but I would like to…

Guillaume
- 8,741
- 11
- 49
- 62
3
votes
3 answers
Avoiding raw_input to take keys pressed while in a loop for windows
I am trying to make a program which has a raw_input in a loop, if anyone presses a key while the long loop is running the next raw_input takes that as input, how do I avoid that?
I don't know what else to add to this simple question. Do let me know…

Rick_2047
- 302
- 1
- 4
- 10
3
votes
3 answers
Maximum characters that can be stuffed into raw_input() in Python
For an InterviewStreet challenge, we have to be able to accomodate for a 10,000 character String input from the keyboard, but when I copy/paste a 10k long word into my local testing, it cuts off at a thousand or so.
What's the official limit in…

Srini Kadamati
- 609
- 1
- 6
- 13
3
votes
1 answer
horizontal mouse wheel messages from windows raw input
I've noticed there isn't a documented equivalent to WM_MOUSEHWHEEL for windows raw input, yet I am receiving WM_INPUT messages for horizontal wheel clicking. Before I embark on my journey to re-invent the wheel (stupid pun intended), has anyone…

defube
- 2,395
- 1
- 22
- 34
3
votes
2 answers
Understanding raw_input function in Python
I have the following code:
age = raw_input("How old are you? ")
height = raw_input("How tall are you? ")
weight = raw_input("How much do you weigh? ")
print " So, you're %r old, %r tall and %r heavy." %(age, height, weight)
Ok so the raw_input…

0101amt
- 2,438
- 3
- 23
- 21
3
votes
1 answer
How do I update a dictionary value having the user choose the key to update and then the new value, in Python?
I am trying to write a program where my brother and I can enter and edit information from our football game rosters to compare teams and manage players, etc.
This is my first 'big' project i've tried.
I have a nested dictionary inside a dictionary, …

Nathan
- 57
- 6
3
votes
1 answer
RawInput WinAPI: GetRawInputBuffer() and message handling
Why
I'm trying to get input from a barcode scanner to my (visual) application. I would like to ignore input from other devices and get the input even if the application loses focus. I found the RawInput API recommended on SO and also elsewhere, to…

emno
- 161
- 1
- 9
3
votes
2 answers
the loop does not execute correctly
class cga(object):
''''''
def __int__(self,i,o):
''''''
self.i = i
self.o = o
def get(self):
''''''
self.i = []
c = raw_input("How many courses you have enrolled in this semester?:")
…

robin
- 31
- 1
3
votes
1 answer
RAWINPUTHEADER hDevice null on WM_INPUT for laptop trackpad
I'm using raw input to handle input for generic devices, thus far all of my test cases have worked (keyboards, game pads and mice), but my laptops track pad is giving me a weird problem. When I get a WM_INPUT message from the track pad (movement or…

Arzana
- 63
- 6
3
votes
1 answer
WinAPI | Unregister RawInputDevice
How can I unregister from RegisterRawInputDevices()?

0xbadf00d
- 17,405
- 15
- 67
- 107
3
votes
2 answers
raw_input prints prompt after asking for input
When I use raw_input, the prompt only shows after the user gives input. Like this:
number = raw_input("Enter a number:")
but when I run this, nothing happens, the I type a number, the it shows the prompt:
123
Enter a number:
(123 used to be blank…

Zazman
- 51
- 2