[Tutor] Setting PYTHONPATH and other env vars dynamically

Jramak jramak345 at gmail.com
Wed Aug 19 01:57:49 CEST 2009


Hello
We have developed three custom applications in Python. Each one of
these applications needs a different PYTHONPATH, in addition to
different environment variables to work. Instead of manually setting
the environment variables for each application, what would be the best
way to set PYTHONPATH and other environment variables for a specific
application? We only run one application at a time, not all of them.
We are running Python 2.5.2 and Python 2.4.1 on Win2K. Is a bash
script that sets the environment variables on the application start-up
 way to go?

Any ideas? I was not aware of site.py until a co-worker bandied it
about - he says site.py is better than PYTHONPATH.

Ideas and recommendations welcome..
Regards
Jramak


More information about the Tutor mailing list