python之简单窗口
from Tkinter import* def on_click(): label['text']= text.get() root = Tk(className='programming our future') label = Label(root) label['text']='be on your own' label.pack() text = StringVar() text.set('who are you,kid') entry = Entry(root) entry['textvariable']=text entry.pack() button = Button(root) button['text'] = 'click me,give you a surprse' button['command']=on_click button.pack() root.mainloop()