Python PY_VAR0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TLILI MED
    New Member
    • Apr 2022
    • 1

    Python PY_VAR0

    Hello
    something that i don't understand
    I launch a prog.py recovering the selected line of a treeview,
    I assign these values ​​to the 2 fields, the tt happens correctly.

    Code:
    prog.py
    
    def selection
           curitem=tree.focus()
           dict=tree.item(curitem)
           chvalue1.set(dict["values"][1])
           chvalue2.set(dict["values"][2])
    The problem is here:
    Calling the same script from another prog.py passing through a function called from a button:

    Code:
    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
    Thanks in advance
    Last edited by zmbd; Apr 21 '22, 10:57 PM.
Working...