from Tkinter import * master = Tk() def OKButtonHandler(): # This is still a callback function--just has a new name # Be sure that the handler name matches the name in the # command field of the appropriate button print "click!" def HowdyButtonHandler(): # This is still a callback function--just has a new name # Be sure that the handler name matches the name in the # command field of the appropriate button print "Howdy from HowdyButtonHandler()!" b = Button(master, text="OK", command=OKButtonHandler) b.pack() anotherButton = Button(master, text="Howdy", command=HowdyButtonHandler) anotherButton.pack() mainloop()