[Tkinter-discuss] multithreading
Craig Allen
callen at gemini.edu
Thu Jul 17 03:09:10 CEST 2008
Anyone that's interested,
I have a command line application which I want to run as such, with a
flag that alternately puts up a pretty monitoring GUI that shows in more
detail what's going on. So fine, I run the Tk mainloop in a background
thread. I've read and learned myself you cannot make your Tk calls
outside this thread. Fine.
But as this is a bit of an extra feature I have not been particularly
careful, and since the command line can execute more than one sequence
of it's processing, it wants to open up a new pair of windows every
time. As I"m just hacking this together (the pretty Tk interface is an
addition, not really required to be build) to do this I call the master
object which is a threading object... i.e. another thread is started,
and this other thread has a mainloop call in it. It all works fine, but
I'm sort of of the impression I'm not supposed to do this, that there
should only be one thread running a mainloop call.
Is that true, is this evil?
Any comments appreciated.
craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20080716/fdc193f2/attachment.htm>
More information about the Tkinter-discuss
mailing list