- How do I import from b1.py into b2.py
- How do I import from sa1 into b2?
test/ # root folder
packA/
subA/
__init__.py
sa1.py
sa2.py
__init__.py
a1.py
a2.py
packB/
b1.py
b2.py
math.py
random.py
other.py
start.py
EDIT solved it by putting:
import os
import sys
sys.path.append(os.getcwd())
where os.getcwd() is the project's root directory.