I have the following python project setup:
/project
/doc
/config
some_config.json
/src
/folderA
__init__.py
Databaseconnection.py
...
/folderB
__init__.py
Calculator.py
...
/main
__init__.py
Main.py
...
/test
__init__.py
AnImportantTest.py
__init__.py
.gitignore
README.md
requirements.txt
Main.py
is the "executable file" (or rather module) that calls all the other modules. All __init__.py
files are empty. How are the import statements in Main.py supposed to look like? I also saw this, which was not very helpful however:
# Main.py
import sys
sys.path.insert(0,'../..')
from folderA.Databaseconnection import * # not working
from src.folderA.Databaseconnection import * # not working
Thank you.