I am running Python 2.5.
This is my folder tree:
ptdraft/
nib.py
simulations/
life/
life.py
(I also have __init__.py in each folder, omitted here for readability)
How do I import the nib module from inside the life module? I am hoping it is possible to do without tinkering with sys.path.
Note: The main module being run is in the ptdraft folder.
It seems that the problem is not related to the module being in a parent directory or anything like that.
You need to add the directory that contains
ptdraftto PYTHONPATHYou said that
import nibworked with you, that probably means that you addedptdraftitself (not its parent) to PYTHONPATH.