We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

Catching the Expose Event

June 01, 1998 | Fredrik Lundh

from Tkinter import *

def update(event):
    print "expose", event.widget

frame = Frame(width=500, height=500)
frame.bind("<Expose>", update)
frame.pack()

mainloop()