def repeater(root): model.update_all() model.display_all() root.after(100,repeater,root)
def repeater(root): """By the script calling this function, the update_all/display_all in the model is called every 100 milliseconds in the GUI's/root thread, and then this function reschedules itself to be called in 100 milliseconds This makes the simulation update itself every .1 seconds""" model.update_all() model.display_all() root.after(100, repeater, root)
def repeater(root): model.update_all() model.display_all() root.after(100,repeater,root) #how many miliseconds to wait