您的位置:首页 > 编程语言 > Python开发

import - Python: Importing modules from parent folder - Stack Overflow

2012-04-20 13:05 393 查看
import - Python: Importing modules from parent folder - Stack Overflow

Python: Importing modules from parent folder

import - Python: Importing modules from parent folder - Stack Overflow

hat's wrong with just
import ptdraft.nib


Update:

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
ptdraft
to PYTHONPATH

You said that
import nib
worked with you, that probably means that you added
ptdraft
itself (not its parent) to PYTHONPATH.

import - Python: Importing modules from parent folder - Stack Overflow

from ... import nib

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: