For me, an 'is' test works to find out what widget the event is taking place on.
#------------------------------------------------------------------------ import Tkinter def display_event(e): print "event received", e.widget, e.widget is t t = Tkinter.Tk() t.bind("<Destroy>", display_event) w = Tkinter.Entry(t) t.destroy() #------------------------------------------------------------------------ This program prints: event received .-1209415348 False event received . True if that fails, you could compare str(e.widget) and t._w, though this can give a false positive if you have multiple Tk() instances---each Tk() instance is called ".". Jeff
pgpXtThASJKeK.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list