Tkinter -- the best way to make a realtime loop

Hendrik van Rooyen hendrik at
Thu Oct 8 09:39:06 CEST 2009

On Thursday, 8 October 2009 00:40:42 J Wolfe wrote:
> What's the best way to make a realtime loop in Tkinter?  I know in
> perl you can use "repeat" and it will call a function every x seconds,
> in python it seems like "after" may be the equivalent though it
> doesn't seem to behave like the perl repeat function. Any ideas?

What do you mean by "real time"?

The after method in tkinter will call the routine after the specified time.

If you want to do it again, you must arrange for the routine to call itself 
again with a further after.

So it is perfectly possible to make a stutter thread that executes 

In which way does this not work for you?

- Hendrik

More information about the Python-list mailing list