[Tutor] getting input from keyboard
Adam Vardy
Adam Vardy <anvardy@roadrunner.nf.net>
Sun Jan 5 01:47:03 2003
Hi Allan,
Thursday, December 26, 2002, 8:38:50 AM, you wrote:
>> How do I get keyboard input in python ?
>> I want to do the equivalent of this C code, in python
>> x=getch()
>> Assuming you are on Windows you need to import mscvrt
>> and use the getch() function in there.
>> If you are on Unix you use the curses(or ncurses) module
>> which also has a getch() function.
>> With the books that I have, there are no references in the
>> index to get, keyboard input, or in the Python help file.
>> My online web tutor (and book!)has a topic on event driven
>> programming which includes an example of using msvcrt.getch()
I could not actually find it there. Can you check if that's where it
should be?
--
Adam Vardy