I'm currently working on a script, script1.py
, which uses a class defined in script2.py
. However, that class in script2.py
uses an instance of another class defined in script1.py
, so essentially both scripts need to import variables from one another to make the entirity work. I can't get this to work and though I can import one-way, I can't manage to import two-way (so both scripts recognize the desired data from the other script). What would be the most logical workaround for this?
Script a needs data from script b, but script b also needs data from script a. Can I import two-way?
Asked
Active
Viewed 39 times
1

Tim Rood
- 49
- 5