title: Showing dialog in non-main thread
body: <p>I have a non-GUI program that sometimes needs to display a dialog to user.
  The problem is that my program runs in an infinite loop and when I show a dialog in this loop the execution of program halts until the dialog is dismissed and this is not wanted because my program loop is a background service that must be responsive all time. So I tried running the dialog showing code in another thread but it doesn't work properly: The dialog is shown only one time/the first time and subsequent calls show nothing.</p>
  
  <p>How can I solve this problem?</p>
  
  <p>This is a sample code for you to test the situation:</p>
  
  <pre><code>import tkinter
  import tkinter.messagebox
  import threading
  import time
  
  def messageBox():
      root=tkinter.Tk()
      root.withdraw()
      tkinter.messagebox.showinfo('dialog', 'test')
      root.destroy()
  
  while True:
      threading.Thread(target=messageBox).start()
      time.sleep(3)    
  </code></pre>
  
  <p>I use Python 3.3.4 on Windows XP</p>