adds callbacks function to a button : Event « GUI Tk « Python
- Python
- GUI Tk
- Event
adds callbacks function to a button

import sys
from Tkinter import *
widget = Button(None, text='Hello', command=sys.exit)
widget.pack()
widget.mainloop()
Related examples in the same category