Can somebody kill getpathp for me?

Tim Peters tim.one at comcast.net
Mon Mar 4 03:53:18 EST 2002


[Tim]
> If, e.g., I set PYTHONHOME to \Python22, then execute python while *in*
> my \Python21 directory (these both referring to PythonLabs distros),
> then Python 2.1.2 comes up with sys.path pointing entirely at Python 2.2
> directories.  This is insane, but shows that PYTHONHOME works the way
> getpathp.c says it works.

[Mark Hammond]
> insane by design ;)  PYTHONHOME was supposed to be a global override.

What's insane is that *I* would do such a thing, not that PYTHONHOME
believes me.  It's great that PYTHONHOME believes me.

The other form of insanity is that there is no "global override" for *all*
of sys.path.  Indeed, the lack of a global, no-kidding, I-really-mean-it,
don't-you-dare-try-to-outguess-me-at-all override is exactly Chris's
problem.

> Didn't someone promise to document all this once? <wink>

Well, you did, but you were Australian then, and we won't hold you to what
you promised before you became a tad civilized <wink>.

> ...
> Or, use MSVC or some other resource editor to change the single string
> resource in the compiled Pythonxx.DLL (ie, no need to rebuild the DLL).
>   This will cause a different registry key to be used (by the core, and
> also by extensions that are registry aware).

Hmm.  In the absence of a global no-kidding whole-sys.path override, maybe
someone would like to contribute a Python script to fiddle the DLL.  *That*
should end this thread <wink>.

you-can-lead-a-python-to-a-rat-but-you-can't-make-it-eat-ly y'rs  - tim





More information about the Python-list mailing list