PYTHONPATH var

Sergey Dikovitsky insfor at gmail.com
Fri May 29 06:44:56 EDT 2009


Hi guys. I have a question regarding runtime definition of the variable
PYTHONPATH. Do you know how without modifying of source code change the
value for this var. Value stores in the system var sys.path, but the first
item of this list, path[0], is the directory containing the script that was
used to invoke the Python interpreter. We need to change this value which
allows to us import scripts first from directory containing newest hotfix
scripts without replacing original project scripts. One of the variant is to
create script which will modify this var and insert line with import this
script into each project script. So the question does another way exist? For
example, parameter or argument for python launcher.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090529/a702091c/attachment.html>


More information about the Python-list mailing list