title: How do I stop the python output console from freeze loading when running a TKinter App?
body: <p>I used this code to create a TKinter file path button to pull the most recent updated csv file then to save it as a pandas dataframe.
  The code works fine but does not save it into a pandas df because the python terminal is stuck in its loading phase.</p>
  <p>My goal is to be able to store the most recently used csv file from a file path and load it into a pandas df in Visual Studio so I can automize the data pipeline into SQL Server.</p>
  <pre><code>import glob
  import os.path
  import pandas as pd
  import tkinter as tk
  
  root= tk.Tk()
  
  canvas1 = tk.Canvas(root, width = 500, height = 250)
  canvas1.pack()
  
  label0 = tk.Label(root, text='Import Latest File')
  label0.config(font=('helvetica', 15))
  canvas1.create_window(250, 45, window=label0)
  
  entry1 = tk.Entry (root, width = 40) 
  canvas1.create_window(350, 100, window=entry1)
  
  entry2 = tk.Entry (root, width = 40) 
  canvas1.create_window(350, 140, window=entry2)
  
  label1 = tk.Label(root, text='Enter Directory Path:')
  label1.config(font=('helvetica', 10))
  canvas1.create_window(150, 100, window=label1)
  
  label2 = tk.Label(root, text='Enter File Type:')
  label2.config(font=('helvetica', 10))
  canvas1.create_window(165, 140, window=label2)
  
  def importFile ():  
      folder_path = entry1.get()
      file_type = entry2.get()
      file_type = '\*' + file_type
  
      files = glob.glob(folder_path + file_type)
      max_file = max(files, key=os.path.getctime)
      
      import_file = pd.read_csv(max_file)
      print (import_file)
      import_file = pd.DataFrame(import_file)
      
    
  button1 = tk.Button(text='Import File', command=importFile, bg='brown', fg='white', font=('helvetica', 10, 'bold'), width = 20)
  canvas1.create_window(250, 200, window=button1)
  
  
  root.mainloop()
  root.quit()
  </code></pre>