BOOGIEMAN <[EMAIL PROTECTED]> writes:
> I have line "time.sleep(60)" in my code
>
> How do I cancel waiting 60 seconds if I want to continue with program
> imediately ? Like "Press some button if you don't want to wait"
>
> If it can't be canceled what's the other solution to
> "wait certain time/or press any button to continue" problem ?
On windows at least, pressing ^C interrupts time.sleep().
print "Press ^C if you don't want to wait"
try:
time.sleep(60)
except KeyboardInterrupt:
pass
Thomas
--
http://mail.python.org/mailman/listinfo/python-list