Tkinter root windows have a method called "after" which can be used to schedule a function to be called after a given period of time. If that function itself calls after, you've setup up an automatically recurring event.
Here is a working example:
import Tkinter
import time
class App():
def __init__(self):
self.root = Tkinter.Tk()
self.label = Tkinter.Label(text="")
self.label.pack()
self.update_clock()
self.root.mainloop()
def update_clock(self):
now = time.strftime("%H:%M:%S")
self.label.configure(text=now)
self.root.after(1000, self.update_clock)
app=App()
Bear in mind that after doesn't guarantee the function will run exactly on time. It only schedules the job to be run after a given amount of time. It the app is busy there may be a delay before it is called since Tkinter is single-threaded. The delay is typically measured in microseconds.