[Pythonmac-SIG] non-blocking keyboard input
Belinda_Thom at hmc.edu
Belinda_Thom at hmc.edu
Wed Feb 7 08:41:17 CET 2007
What's the best way to get non-blocking input from keyboard w/OS X 10.4?
I've found various potential leads via Google, most using curses (which
I've never used). I've not found any Mac-specific way of doing this (even
checked the Mac Python Reference manual). On windows machines, folks were
talking about an msvcrt module, which I get the impression calls into
Microsquashes keyboard hit function. Is there something similar for a Mac?
Ideas?
My application is really basic and will run from the cmd line:
while(True) :
if nonBlockInputExists :
break
else :
# continue looping
I am at a loss for how to determine if a key has been pressed.
Thanks much,
--b
More information about the Pythonmac-SIG
mailing list