<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.12.3">
</HEAD>
<BODY>
Ok, for anyone interested it felt bad to do to tkinter but even more importantly, it was not necessary to be so wasteful with threads, I really only need a single GUI thread (I may not feel that way the first time a problem in one window hangs them all), so I just redid things so all the windows are created and controlled by a single thread, and I use a list as a queue of commands from other threads (i.e. &quot;open another set of windows associated to xyz data&quot;).<BR>
<BR>
cheers.<BR>
<BR>
On Wed, 2008-07-16 at 15:09 -1000, Craig Allen wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">Anyone that's interested,</FONT><BR>
    <BR>
    <FONT COLOR="#000000">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.&nbsp; 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.</FONT><BR>
    <BR>
    <FONT COLOR="#000000">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.&nbsp; As I&quot;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.&nbsp; 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.&nbsp; </FONT><BR>
    <BR>
    <FONT COLOR="#000000">Is that true, is this evil?</FONT><BR>
    <BR>
    <FONT COLOR="#000000">Any comments appreciated.</FONT><BR>
    <BR>
    <FONT COLOR="#000000">craig </FONT>
<PRE>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">Tkinter-discuss mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Tkinter-discuss@python.org">Tkinter-discuss@python.org</A></FONT>
<FONT COLOR="#000000"><A HREF="http://mail.python.org/mailman/listinfo/tkinter-discuss">http://mail.python.org/mailman/listinfo/tkinter-discuss</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>