Thanks! Your message guided me to the solution to my problem.
Shankar ----- Original Message ----- From: Markus Weihs <[EMAIL PROTECTED]> Date: Friday, June 10, 2005 5:01 pm Subject: Re: bind in Tkinter > 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 > -- http://mail.python.org/mailman/listinfo/python-list