import Tkinter import sys win = Tkinter.Tk() b = Tkinter.Button(win, text="Hello Python World!",command=sys.exit) b.pack() win.mainloop()