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.
精彩评论