how to stop a loop with ESC key? [newbie]

mo WYWAL_TOmich202 at o2.pl
Tue Nov 8 04:42:57 EST 2005


Thanks,
I tryed your example:

import msvcrt
while 1:
    print '.'
    if msvcrt.kbhit() and msvcrt.getch() == chr(27):
         break

but it doesn't work. It is running (Win2000), there is no messages about
errors but there is no effect when pressing ESC key. What I am doing wrong?
mo





More information about the Python-list mailing list