Sleep timer but still responsive?
andreas.tawn at ubisoft.com
Fri Jan 29 18:33:19 CET 2010
> On Jan 28, 4:55 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> > Please provide more details. What do you want your program to do
> > sleeping? What kind of actions do you want a response to?
> > Do you have a GUI? A curses-based interfase?
> > --
> > Gabriel Genellina
> My app is purely console based. I just don't want the console to lock
> up (on Windows using time.sleep(x) causes the console to become
> unresponsive until the timer is done), and I want people to be able to
> CTRL+C to stop the script if need be (which can't be done if it's
How about this? Responds to ctrl+c, but still sleeps.
while n > 0:
n -= 1
More information about the Python-list