I have 2 files:
fileA.py
and
fileB.py
I am trying to set (change) a variable from fileA
from a function within fileB
. The variable I'm trying to change is inside of a class (I believe the variable is a Class variable). I tried importing fileA
inside of fileB
but got errors.
# fileA:
...
class SomeDialog(QDialog):
my_var = 0
...
# fileB:
...
from fileA import SomeDialog as sd
def my_func():
sd.my_var = 5
...
Any help?