hi can someone help please key bind

Gary woodygar at sky.com
Sat Oct 15 13:30:59 EDT 2011


Hi im trying to use key bind on Tkinter to call this function

def Start():
     for i in range(60,-1,-1):
         ent['text'] = i
       time.sleep(1)
       root.update()
     ent['text'] = 'Time Out!'
     root.update()

i know the function is ok as i have assigned a button and i calls the 
function as i expect
but
root.bind('<a>',Start)
gives the following error

Exception in Tkinter callback
Traceback (most recent call last):
   File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1413, in __call__
     return self.func(*args)
TypeError: Start() takes no arguments (1 given)

Thanks



More information about the Python-list mailing list