title: python Tkinter, threading, and loops
body: <p>Full disclosure, this is a cross-post from Reddit.</p>
  
  <p><a href="http://pastebin.com/wSFA2DKM" rel="nofollow">Code here</a>.</p>
  
  <p>I have a script that I have worked on that is using tkinter to popup some boxes to collect some information from a user. This information is used to launch an external application that when finished produces a log file that I am interested in. Alternatively, I offer a button that the user can press to manually generate that log file. These (the external app &amp; and the GUI button) are launched as two separate threads and the main program watches waiting for either of the two to provide the desired log. When the log appears and I have what I need I close out anything that has been recently opened (not an ideal way to do things, but working ok in this environment).</p>
  
  <p>My problem is that I can run this one time without issue, but if I try to loop it, it makes it to the point of my threaded interrupt button (which is actually not the first time <code>tkinter</code> is used in the script) and blocks - probably because I ungracefully closed the Tk() the first time around?</p>
  
  <p>I have tried reordering these steps in so many different ways with no luck. Does anyone have any pointers?</p>
  
  <p>A very simplified version of my script that demonstrates my issue is posted here: <a href="http://pastebin.com/wSFA2DKM" rel="nofollow">http://pastebin.com/wSFA2DKM</a>
  Windows 7 64-bit, Python 2.7.5 32-bit</p>