title: Tkinter GUI disappears when file selection dialog appears
body: <p>Background:
  I am building a GUI for a PDF app. This app requires that the user select the location of the file and provide some additional information so that a cover page can be generated and then appended to a PDF. I have chosen Tkinter to create the GUI for this app. I developing on Mac OS. </p>
  
  <p>Problem:
  I am able to generate a file selection dialog upon pressing the form's button, however, the GUI disappears immediately after the file selection dialog appears. Does someone know what is causing this?</p>
  
  <pre><code>from tkinter import *
  from tkinter import filedialog
  
  root = Tk()
  Label(root, text='Submittal No. ').grid(row=0)
  Label(root, text='Project Name ').grid(row=1)
  Label(root, text='Product Name ').grid(row=2)
  e1 = Entry(root)
  e2 = Entry(root)
  e3 = Entry(root)
  e1.grid(row=0, column=1)
  e2.grid(row=1, column=1)
  e3.grid(row=2, column=1)
  
  def fileSelector():
      root.withdraw()
      root.fileName = filedialog.askopenfilename()
      print(root.fileName)
  
  Button(root, text='Select PDF file ', command=fileSelector).grid(row=3)
  
  if __name__ == "__main__":
      mainloop()
  </code></pre>