G
Gary
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
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