#!/usr/bin/python from Tkinter import * root = Tk() but = Button(root, text = 'quit', command=sys.exit) but.pack(side = TOP) root.mainloop()