loop until keypress (Windows XP)

Andy Terrel andy.terrel at gmail.com
Thu Aug 10 02:12:11 EDT 2006


If you did want a linux version you could just make people send a
KeyboardInterupt.


try:
    print "Press ^C to stop"
    loop
except KeyboardInterrupt:
    some stop action or just pass




More information about the Python-list mailing list