from Tkinter import * def button_click() : print "The button was clicked!" root = Tk() btn = Button(root, text="Push Me!", command=button_click) btn.pack() root.mainloop()