使用Tkinter的属性变量,参考下面代码中的a
import Tkinter
def cc(arge):
print a.get()
win = Tkinter.Tk()
win.geometry('300x300+300+300')
a = Tkinter.StringVar(win)
a.set("10")
lblban = Tkinter.Entry(win, textvariable=a, width="4",font=("宋体", 12, "normal"))
lblban.bind("
lblban.place(x=0,y=0,width=60,height=60)
win.mainloop()