在下拉菜单中显示选项不足

2024-06-26 14:18:25 发布

您现在位置:Python中文网/ 问答频道 /正文

当我打印“chunk”时,输出会显示“PY\u 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)

Tags: thetopydefaultvalueonshowgui