#!/usr/bin/python from Tkinter import Tk root = Tk() root.call('bind', root, '', 'puts %D') root.mainloop()