How would I organize my python imports so that I can have a directory like this.
project
|
| __init__.py
|
src
|
| __init__.py
| classes.py
|
test
__init__.py
tests.py
And then inside /project/test/tests.py be able to import classes.py
I've got code looking like this in tests.py
from .. src.classes import(
scheduler
db
)
And am getting errors of
SystemError: Parent module '' not loaded, cannot perform relative import
Anyone know what to do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…