Mega Code Archive

 
Categories / Python / GUI Tk
 

Adds callbacks function to a button

import sys from Tkinter import * widget = Button(None, text='Hello', command=sys.exit) widget.pack() widget.mainloop()