我正在运行Python 2.5.
这是我的文件夹树:
ptdraft/ nib.py simulations/ life/ life.py
(我也在__init__.py每个文件夹中,为了便于阅读,这里省略了)
__init__.py
如何nib从模块内导入life模块?我希望有可能不用修补sys.path.
nib
life
注意:正在运行的主模块位于该ptdraft文件夹中.
ptdraft
python directory module path python-import
directory ×1
module ×1
path ×1
python ×1
python-import ×1