[Tutor] Python 3.0
Paul Whittaker
paul.whittaker20 at ntlworld.com
Sat Feb 20 11:52:43 CET 2010
Using the following script, the (Windows 7) PC echoes the key presses but
doesn't quit (ever!)
import msvcrt
print('Press SPACE to stop...')
while True:
k = msvcrt.getch() # Strangely, this echoes to the IDLE window
if k == ' ': # Not recognized
break
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100220/baf9f28a/attachment.htm>
More information about the Tutor
mailing list