I have a a project with following path:
shift/
Code/
__init__.py
mymain.py
run.py
Test/
__init__.py
tester.py
runtester.py
requirments.txt
in mymain.py
there is a class which I need to import from the tester.py
. So in tester.py
I'm importing class as following codes but none of them work.
from Code.mymain import NewClass
from .mymain import NewClass
from mymain import NewClass
from shift.Code.mymain import NewClass
I also tried to insert the path in tester.py
:
cwd = os.getcwd()
sys.path.insert(0, cwd)
However still confused why it does not know my file