# -*- coding: utf-8 -*-
import Tkinter
top=Tkinter.Tk()
hello=Tkinter.Label(top,text='hello')
hello.pack()
quit=Tkinter.Button(top,text='退出',command=top.quit,bg='red',fg='white')
quit.pack(fill=Tkinter.X,expand=1)
Tkinter.mainloop()
Tkinter界面
# -*- coding: utf-8 -*-
import Tkinter
top=Tkinter.Tk()
hello=Tkinter.Label(top,text='hello')
hello.pack()
quit=Tkinter.Button(top,text='退出',command=top.quit,bg='red',fg='white')
quit.pack(fill=Tkinter.X,expand=1)
Tkinter.mainloop()
Tkinter界面