I want to have following project directory structure in python:
project\
generic.py
subdir1\
file1.py
subdir2\
file2.py
subdir3\
file3.py
within file1.py I want to import generic.py from a root dir of project.
import generic
Unfortunatelly I got error when a try to execute "file1.py"
root:~/project/sidir1# python file1.py
Traceback (most recent call last):
File "file1.py", line 7, in <module>
import generic
ImportError: No module named generic
I want to execute individual file*.py and have generic.py included.
How to correctly include it under such a drirectory structure?