title: Progressbar starts after print statements
body: <p>Why is the progressbar starting after the print-commands?</p>
  <p>I want to start the progressbar first. And wenn the 2nd print command (&quot;After the sleep statement&quot;) was excecuted, I want to stop the progressbar. Any ideas?</p>
  <pre><code>from tkinter import Tk 
  from tkinter.ttk import Progressbar 
  import time
  
  # root window 
  root = Tk() 
  root.geometry('300x120') 
  root.title('Progressbar Demo')
  
  root.grid()
  
  # progressbar 
  pb = Progressbar(
      root,
      orient='horizontal',
      mode='indeterminate',
      length=280 )
  
  # place the progressbar 
  pb.grid(column=0, row=0, columnspan=2, padx=10, pady=20)
  
  pb.start()
  
  
  
  print(&quot;Before the sleep statement&quot;)
  time.sleep(5)
  print(&quot;After the sleep statement&quot;)
  
  # pb.stop()
  
  root.mainloop()
  </code></pre>
  <p>The current problem is that the progressbar is only started after time.sleep command.</p>