Tkinter: is event_generate safe from background thread?

Russell E. Owen no at spam.invalid
Sat Dec 27 00:39:13 CET 2003

In general, I thought one should not mess with Tkinter from a background 
thread. But Eric Brunel recently posted a clever suggestion that one 
could communicate from a background thread to the main thread using 
event_generate to create custom events. Very neat: it's direct and it 
saves polling. He said it works for him on Linux, Windows and Solaris. 
I'd love to use it in my code, but am wondering if it's truly safe, e.g. 
safe by design and likely to remain so?

Also, are there any other things one can safely do with Tkinter from 
background threads (such as set variables)?

-- Russell

More information about the Python-list mailing list