title: Python 3 Tkinker Multi threading
body: <p>I have tired implementing other's threading for my very basic tkinker search GUI but, out of the various implementations I have attempted, none of them worked for me. The search function take some time to search through all the directories, and is successful. But, after the OS window opens with the correct directory, my tkinker GUI is hung-up and useless. This is my first time using multi-threading, thank you in advance.</p>
  
  <pre><code>"""
  Script lunches GUI with text field and search button
  Text field arg = WR # string
  Search button event = calls Search
  Search func looks in F:/WEST/* and F:/NORTH/* directories for WR # directory
  Search func gets WR # directory
  Search func opens WR # directory window in OS
  """
  
  #Libaries
  from tkinter import *
  import glob
  import os
  import threading
  import time
  from queue import *
  
  
  def search():
      """
      Searchs through NORTH and WEST directories
      Finds folder paths recursively with WR number at end of path name
      Calls os.startfile to Open the folder
      :return:NULL
      """
      wrNumber = e1.get()
      northPath   = 'F:/NORTH/**/**/**/**/*'
      westPath    = 'F:/WEST/**/**/**/**/*'
  
      for folderName in glob.iglob(westPath + str(wrNumber), recursive=True) \
                  or glob.iglob(northPath + str(wrNumber), recursive=True):
          print(folderName)
          print(str(wrNumber))
  
          os.startfile(str(folderName))
  
  
  #Initializes basic GUI window elements
  master = Tk()
  
  #Create GUI Title = 'WR# Searcher'
  master.title("WR# Searcher")
  
  #Create Label e1 = 'WR#'
  Label(master, text="WR #", ).grid(row=0)
  e1 = Entry(master)
  e1.grid(row=0, column=1)
  
  #Create Button Button = 'Search'
  Button(master, text='Search', command=search).grid(row=0, column=2, sticky=W, pady=4)
  
  master.mainloop()
  </code></pre>