Tkinter event loops

Russell E. Owen owen at astrono.junkwashington.emu
Mon Aug 20 20:01:59 EDT 2001


What sort of activities did you have in mind? If network or file I/O 
(e.g. pipes to other tasks) then use file events 
<http://www.astro.washington.edu/owen/ROTKFolklore.html> (cheat sheet; I 
haven't found a Tkinter reference that describes them). Warning: file 
events are broken on MacPython after version 1.5.2.

If that won't do you, I seem to recall reading that you can get away 
with using threads with Tkinter, but that you must always update Tk 
widgets from the main thread. This may be wrong; I've never tried it.

-- Russell

In article <3B8137CF.82515CD6 at eegsoftware.com>,
 Howard Lightstone <howard at eegsoftware.com> wrote:

>How do I provide the same event handling as the mainloop method while
>still allowing me to "poll" other activities?
>
>Do I use the update method or update_idletasks method or ???



More information about the Python-list mailing list