开发者

Specifying site directory outside of the script

Is it possible to specify site directories through python command line or environmen开发者_JAVA百科t? Right now I'm using site.addsitedir, but I would like to make the script agnostic of the site-setting logic


The PYTHONPATH environment variable is essentially the same thing. Set it to a directory containing Python modules or packages and it will be added to sys.path at initialization.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜