Drawing in "Slow motion".
Hans Kristian Ruud
hans at inenco.no
Tue Feb 12 16:04:40 CET 2002
Eric Brunel wrote:
> Hi Hans,
> Two solutions come to my mind:
> - keep your time.sleep calls, but call the update_idletasks method on the
> canvas after each sleep. The call should redraw the screen.
> - a bit trickier: use the delayed callback facility in Tk via the "after"
> method to draw while your application is running. This is a bit more
> complicated and you would certainly have to rewrite your code differently.
> But it's the only way to have a "reacting" application while the drawing
> takes place (i.e. user is able to click on buttons, call menus, etc...).
> Here is a simple example, just drawing random lines:
Thanx a lot; these solutions were very helpful.
> - eric -
- hans kristian -
More information about the Python-list