from Tkinter import *
def hello(event):
print 'Double Click to exit'
def quit(event):
print 'You double clicked...'
import sys; sys.exit()
widget = Button(None, text='Hello event world')
widget.pack()
widget.bind('', hello) # bind left mouse clicks
widget.bind('', quit) # bind double left clicks
widget.mainloop()