[Tutor] ReadKey function in Python

alan.gauld@bt.com alan.gauld@bt.com
Wed, 5 Apr 2000 17:31:53 +0100


> I'm a newbie in Python and want to know how to read-in each key in the
> keyboard (including the F1-F12, Ctrl, Alt, and Shift keys) in 
> Python? Is it possible?

It is in Tkinter.
See my tutor under the topic 'Event Driven Programming' for an example:
http://www.crosswinds.net/~agauld

But if anyone knows how in 'raw' Python I'd be interested too.
Even more so if you can tell me how to do a QBASIC INKEY$ 
type function. I thought there might be a py-curses module 
but can't see one. (I usually use curses for this in C on Unix...)

Alan G.