title: python time sleep method in canvas
body: <p>This is what I am trying to do. Very simple code. Draw line from one point to another gradually. Here's my code:</p>
  
  <pre><code>from Tkinter import *
  import time
  
  mGui = Tk()
  mGui.title('GUI Example')
  mGui.geometry('1024x576+10+30')
  
  #Canvas
  canvas_1 = Canvas(mGui,height=500,width=500,bg='grey')
  
  for i in range(1, 500):
      time.sleep(0.5)
      canvas_1.create_line(0,0,i,i)
      canvas_1.update()
  
  canvas_1.pack()
  
  mGui.mainloop()
  </code></pre>
  
  <p>My window just stays blank white 0.5*500 seconds (250 seconds) and then canvas shows up with the line drawn. What am I doing wrong? </p>