Calling tcl from python and viceversa
Jeff Epler
jepler at unpythonic.net
Sat Jul 19 23:15:20 EDT 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)
Jeff
More information about the Python-list
mailing list