title: Tkinter TkMessageBox not closing after click OK
body: <p>I have created a script in Python which notifies me at a given event.
  I am using the following function to produce the warning window:</p>
  
  <pre><code>def window_warn():
      '''
      This function will throw up a window with some text
      '''
      #These two lines get rid of tk root window
      root = Tkinter.Tk()
      root.withdraw()
      #tkMessageBox.deiconify() 
      TkMessageBox.showwarning("New Case", "You have a new case\n Please restart pycheck")
      return
  </code></pre>
  
  <p>The window draws fine, but when I click ok, the window stays in place with the button depressed. Im using xfce.
  Is there anyway to get the window to close after ok is clicked?</p>
  
  <p>A comment indicated this may be to do with surrounding code, so for completeness:</p>
  
  <pre><code>print "Just started newcase check"
  while True:
      if "Uncommitted" in webpage:
          print "oh look, 'Uncommitted' is in the url returned from the last function"
          #If this hits we call a notification window
          window_warn()
          print "sleeping"
          time.sleep(10)
  
          webpage = scrape_page()
      else:
          print "nothing"
          time.sleep(20)
          webpage = scrape_page()
  </code></pre>