Hi! If you press a key, a key-event is passed to the function, here to self.quit. This is the misterious second argument, which can be useful if you e.g. want to check which key was pressed. Here is a snippet to show how you can do it:
from Tkinter import * def quit_program(event): print event.keysym # which key was pressed? root.quit() root = Tk() e = Entry() e.bind("<Return>", quit_program) e.pack() root.mainloop() Regards, mawe -- http://mail.python.org/mailman/listinfo/python-list