Python py_var0
你好
一件我不明白的事
我启动了一个程序.py,恢复树视图的选定行,
我将这些值赋给这两个字段,TT就会正确发生。
选择 | 换行 | 行号
- prog.py
- def selection
- curitem=tree.focus()
- dict=tree.item(curitem)
- chvalue1.set(dict["values"][1])
- chvalue2.set(dict["values"][2])
问题就在这里:
通过一个从按钮调用的函数从另一个p..py调用相同的脚本:
选择 | 换行 | 行号
- prog1.py (this is the prog that calls prog.py)
- def list():
- exec(open("./prog.py").read(), globals())
- chEntry1=entry(fen, textvariable=chvalue1)
- chEntry2=entry(fen, textvariable=chvalue2)
- the chvalue1 and chvalue2 do not take any value and my print displays py_var7
提前谢谢你