Real-time Update
Alex Martelli
aleax at mac.com
Thu Jul 19 10:46:45 EDT 2007
Hendrik van Rooyen <mail at microcorp.co.za> wrote:
> "ReTrY" <retrry at gmail.com> wrote:
>
> > I'm writing a program with Tkinter GUI, When the program is running it
> > need to be updated every five seconds (data comes from internet). How
> > should I do that ? How to make a function in main loop ?
>
> Short answer:
>
> use the after method to set up a periodic scan of a queue.
>
> In another thread, look for the new stuff, and put it on the queue when found.
>
> there is a recipe for this sort of thing, but I keep losing links.
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/82965> .
Alex
More information about the Python-list
mailing list