Mega Code Archive

 
Categories / Python Tutorial / Tkinker
 

Call sys exit command from Button

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