[Tutor] Timing errors
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Tue Dec 16 15:34:10 EST 2003
> Could someone please educate me why this simple interface waits 10
> seconds and then draws the rectangle??
Ah! Use the 'sleep()' method that comes with livewires --- time.sleep()
from the Standard Library actually interferes with the 'Tkinter' graphic
event loop, preventing it from redrawing the screen.
The fix should be easy: just substitute:
sleep(...)
wherever you see:
time.sleep(...)
and your livewires code should be fine.
Good luck!
More information about the Tutor
mailing list