开发者

Specifying site directory outside of the script

开发者 https://www.devze.com 2023-03-23 00:45 出处:网络
Is it possible to specify site directories through python command line or environmen开发者_JAVA百科t?

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

精彩评论

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