I have a tree structure
- My_app - __init__.py - main.py - Cus_Scripts - __init__.py - script1.py - script2.py - classA
I am running like this
in script1 I get a ModuleNotFoundError saying it can't find script2. I am using VSC.
I fixed this by adding this to every file.
#Custom Lib sys.path.insert(1, os.getcwd())
This allowed me to access anypart of the program with
from My_App.script2 import classA import My_App.script1