[Distutils] Python environment variables

Greg Stein gstein@lyra.org
Mon, 08 Mar 1999 18:58:39 -0800

Michel Sanner wrote:
> Hi,
> Has the following idea ever been discussed ?
> is it possible/desirable to have the Python environment variables with version
> number ?
> I have run into problems with that because I have version 1.5 embeded in an
> application and I use PYTHONHOME to tell this interpreter where to find it's
> common .py files and I run 1.5.2b1 as my current python version. The PYTHONHOME
> environment variable set for the embeded interpreter created quite a confusion
> for 1.5.2b1.

The best thing to do is to avoid using environment variables,
*especially* for embedded interpreters.

On Windows, I would always modify the "Version" (which is now in a
resource) to effectively create a private distribution. In the registry,
I'd set up PythonCore/MyVersion/... keys. At that point, it just always
used the keys that I set.

Since you're building an embedded version, then you may as well set up
that version to have the proper paths within it, rather than relying on
external factors which can change...


Greg Stein, http://www.lyra.org/