I have a project setup looks like this:
Base project
/some_disk/some_folder/
|-- project/
| |-- package/
| | |-- src/
| | | |-- file_a.py
| | | |-- file_b.py
Extension project
/some_other_disk/some_folder/
|-- project/
| |-- package/
| | |-- src/
| | | |-- file_c.py
| | | |-- file_d.py
Then I have a third project, in which I would like to be able to use both mopdules file_a and file_c.
In that third project, I have setup my Python path like this
PYTHONPATH=$PYTHONPATH:/some_disk/some_folder:/some_other_disk/some_folder
Then, to import the files, I have this in my main module:
import project.module.src.file_a
import project.module.src.file_c
This, however, only makes me able to import one of the modules, and having an module not found error on the other one.
Can I make this work using this project structure? Or will Python always only look into one of the "main"-modules and consider the sub-module not found if it's not in there?
EDIT: The project makes use of Python 2.6