Calling tcl from python and viceversa

Jeff Epler jepler at
Sun Jul 20 05:15:20 CEST 2003

You can convert your code so that it runs from callbacks
(after/after_idle), or so that it calls the Tk event handler at reasonable
intervals.  The first approach means greatly changing your code (though
you may be able to abuse generator functions here), and the second
approach means that a few Tk things will interact badly with your fake
mainloop (tk_wait).  Threading is another possibility, but it's
problematic with Tk because you must make sure all Tk calls happen in
only one thread (the main thread, I think; or maybe the thread that
created the Tk instance)


More information about the Python-list mailing list