hi can someone help please key bind

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top