title: Updating tkinter label based on loop
body: <p><strong>Background Information</strong></p>
  
  <p>Hello. What I'm trying to do currently is create the tkinter window, run a for loop and update the label in real-time as the for loop is running through the directories (in this case, it is listing all the directories with their full paths in the C drive of my computer).</p>
  
  <p><strong>The Problem</strong></p>
  
  <p>The problem that I'm running into is that as soon as I click the <code>start</code> button (which begins the for loop) the GUI completely freezes (I'm aware that this is because tkinter and loops don't play well, I just wonder if there is a solution I'm not aware of), which is counter intuitive as I'd like it to display the directory that the loop is currently iterating over within my <code>tooltip</code> label.</p>
  
  <p><strong>What I've tried so far</strong></p>
  
  <pre><code>from tkinter import Tk, Label, Frame, Button
  import os
  
  def start_command():
      for root_directory, sub_directories, files in os.walk("C:\\"):
          for sub_directory in sub_directories:
              full_directory = os.path.join(root_directory, sub_directory)
              tooltip.config(text=full_directory)
  
  window = Tk()
  tooltip = Label(window, text="Nothing Here Yet")
  tooltip.pack()
  start = Button(text="Start", command=start_command)
  start.pack()
  
  window.mainloop()
  </code></pre>
  
  <p><strong>Tl;Dr</strong>
  I'm trying to run a for loop within tkinter and update the label every iteration.
  The problem is the GUI is freezing with the above code.</p>
  
  <p>Any help would be greatly appreciated.
  Thank you for your time :)</p>