title: (Tkinter) Trying to updated progress bar value in loop but crashed program?
body: <p>I just want the progress bar to fill when I click the button but anytime I click the button it crashes and I get no error in my console</p>
  
  <pre><code>from tkinter import *
  from tkinter.ttk import Progressbar
  from tkinter import ttk
  from time import sleep
  
  window = Tk()
  window.title("Gui Testing")
  window.geometry("350x200")
  
  style = ttk.Style()
  style.theme_use("default")
  style.configure("black.Horizontal.TProgressbar",background="black")
  bar = Progressbar(window,length=200,style="black.Horizontal.TProgressbar")
  bar["value"] = 0
  bar.grid(column=0,row=0)
  
  def prog():
      i = 0
      while i &lt;= 100:
          sleep(.5)
          i = i + 1
          bar["value"] = i
  btn = Button(text="Click",command=prog)
  btn.grid(column=0,row=1)
  
  window.mainloop()
  </code></pre>