from Tkinter import *root = Tk()def greet(*ignore): print 'Hello World'root.bind('', greet)root.mainloop()