Tkinter -- the best way to make a realtime loop

J Wolfe vorticitywolfe at gmail.com
Thu Oct 8 13:15:32 EDT 2009


Thank you both for your replies.  I had something similar to this:

def incr():
  var.set(1 + var.get())
  root.after(1000, incr)

except I had an extra set of parenthesis...
def incr():
  var.set(1 + var.get())
  root.after(1000, incr())

on the function which was screwing it up. Also needed to have a
root.update() to refresh the GUI.

Thanks again,
Jon



More information about the Python-list mailing list