[Tutor] alternative to time.sleep()
Andrei Kulakov
ak@silmarill.org
Sun, 7 Jul 2002 03:34:13 -0400
On Sat, Jul 06, 2002 at 11:00:52PM +0000, Kyle Babich wrote:
> I'm looking for an alternative to time.sleep() that will visually
> countdown/countup the sleep time and can be paused and resumed at any
> point. Any ideas?
>
> Thanks
> --
> Kyle
>
You have to have a separate thread that prints time left, sleeps one
sec, prints time left, etc. And main thread will wait for input and if
you hit 'p'enter it'll set second_thread.paused variable.
>
>
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
--
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org