I am running Python 2.5.
This is my folder tree:
ptdraft/ nib.py simulations/ life/ life.py
(I also have __init
__init
same sort of style as the past answer - but in fewer lines :P
import os,sys parentdir = os.path.dirname(__file__) sys.path.insert(0,parentdir)
file returns the location you are working in