Re: bind in Tkinter

2005-06-10 Thread Shankar Iyer ([EMAIL PROTECTED])
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

Re: bind in Tkinter

2005-06-10 Thread VK
une 10, 2005 4:53 pm > Subject: Re: bind in Tkinter > > >>Shankar Iyer ([EMAIL PROTECTED]) wrote: >> >>>I have been trying to learn how to associate keyboard events with >> >>actions taken by a Python program using Tkinter. From what I've >

Re: bind in Tkinter

2005-06-10 Thread Markus Weihs
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

Re: bind in Tkinter

2005-06-10 Thread Shankar Iyer ([EMAIL PROTECTED])
I believe the quit function is built in. Anyway, I get the same type of error if I substitute a function that I have defined. Shankar - Original Message - From: VK <[EMAIL PROTECTED]> Date: Friday, June 10, 2005 4:53 pm Subject: Re: bind in Tkinter > Shankar Iyer ([EMAIL

Re: bind in Tkinter

2005-06-10 Thread VK
Shankar Iyer ([EMAIL PROTECTED]) wrote: > I have been trying to learn how to associate keyboard events with actions > taken by a Python program using Tkinter. From what I've read online, it > seems that this is done with the bind methods. In one of my programs, I have > included the following: