当我打印" chunk" ,输出将显示我" PY_VAR0"我哪里出错?
chunk = IntVar(root)
chunk.set("4") # default value to show on the GUI
print chunk
#option for segment size
chunkOption = OptionMenu(root, chunk,"4", "16", "32", "64", "128", "265", "512" )
chunkOption.pack(side=Tkinter.TOP)
答案 0 :(得分:0)
要使用IntVar
中的值,您必须使用get
方法获取值:
print chunk.get()