from Tkinter import *def hello(event): print 'Press twice to exit' def quit(event): print 'Hi...' import sys; sys.exit() widget = Button(None, text='Hello event world')widget.pack()widget.bind('<Button-1>', hello) widget.bind('<Double-1>', quit) widget.mainloop()
Name (required)
email (will not be published) (required)
Website