开发者

How to import modules in Paver?

I am using Paver for the firs开发者_开发知识库t time and I can't import in my pavement.py a module I created in the same directory. The module was working when imported in a standalone script in the same directory. I guess paver is running from somewhere else, not the same directory.

Any suggestion?


After a bit of investigation I found a solution...

import sys
sys.path.append( os.path.abspath('.') )
import mymodule.myscript as myscript
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜