Problems with Tkinter and threads

Claus Tondering claus.tondering at gmail.com
Mon Jul 17 09:20:46 EDT 2006


Eric Brunel wrote:
> This is where the problem is: if you do just a event_generate without
> specifying the 'when' option, the binding is fired immediately in the
> current thread. To be sure that an event is created and that the thread
> switch actually happens, do:
>
> app.event_generate("<<myevent1>>", when='tail')
>
> and things should work fine.

Nice!

Obviously, there are important things that I don't know about Tkinter.
Unless I'm much mistaken, neither Fredrik Lundh's "An Introduction to
Tkinter" nor John W. Shipman's "Tkinter reference: a GUI for Python"
mentions the when='tail' option.

--
Claus Tondering




More information about the Python-list mailing list