title: Matplotlib figures not working after Tkinter file dialog
body: <p>I'm using the following function which I found as a reply to <a href="https://stackoverflow.com/questions/9319317/quick-and-easy-file-dialog-in-python">this question</a> to show a dialog window for file selection.</p>
  
  <p>[ Edit: Turns out the distro differences here are merely because Matplotlib is using gtk3agg on Fedora and TkAgg for drawing windows on each system ]</p>
  
  <p><strong>On Fedora 18:</strong> Everything works fine.</p>
  
  <p><strong>On Ubuntu 12.10:</strong> Matplotlib hangs after closing any figure displayed after the file dialog. For example, in the code below, on Ubuntu I can never get to the "made it" line. I am still able to type in the terminal, though nothing happens. If I remove the file dialog, Matplotlib figures work as expected.</p>
  
  <pre><code>import Tkinter, tkFileDialog
  import pylab
  
  def ask_for_config_file():
  
      print "Please provide location of configuration file."
  
      root = Tkinter.Tk()
      root.withdraw()
      file_path = tkFileDialog.askopenfilename()
  
      return file_path
  
  
  def main():
  
      config_file_path = ask_for_config_file()
  
      pylab.figure()
      pylab.show()
  
      print "Made it."
  </code></pre>
  
  <p>Any suggestions?</p>