from Tkinter import *import sysdef close(): sys.exit(0)root = Tk()button = Button(root)button['text'] = "Close"button['command'] = closebutton.pack()root.mainloop()