470,575 Members | 1,235 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,575 developers. It's quick & easy.

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.

Expand|Select|Wrap|Line Numbers
  1. prog.py
  2.  
  3. def selection
  4.        curitem=tree.focus()
  5.        dict=tree.item(curitem)
  6.        chvalue1.set(dict["values"][1])
  7.        chvalue2.set(dict["values"][2])
  8.  
The problem is here:
Calling the same script from another prog.py passing through a function called from a button:

Expand|Select|Wrap|Line Numbers
  1. prog1.py (this is the prog that calls prog.py)
  2.  
  3. def list():
  4.      exec(open("./prog.py").read(), globals())
  5.  
  6.  
  7. chEntry1=entry(fen, textvariable=chvalue1)
  8. chEntry2=entry(fen, textvariable=chvalue2)
  9. the chvalue1 and chvalue2 do not take any value and my print displays py_var7
Thanks in advance
3 Weeks Ago #1
0 9488

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.