[Python-Dev] Windows registry path not ignored with Py_IgnoreEnvironmentFlag set

Mark Hammond skippy.hammond at gmail.com
Sat Jun 5 01:47:26 CEST 2010


On 2/06/2010 11:32 AM, Farshid Lashkari wrote:
> Hello,
>
> I noticed that if Py_IgnoreEnvironmentFlag is enabled, the Windows
> registry is still used to initialize sys.path during startup. Is this an
> oversight or intentional?

I guess it falls somewhere in the middle - the flag refers to the 
'environment' so I believe it hasn't really been considered as applying 
to the registry - IOW, the reference to 'environment' probably refers to 
the specific 'environment variables' rather than the more general 
'execution environment'.

> I assumed one of the intentions of this flag is to prevent embedded
> Python interpreters from being affected by other Python installations.
> Ignoring the Window registry as well as environment variables seems to
> make sense in this situation.

I agree.

> If this is an oversight, would it be too late to have this fixed in
> Python 2.7?

Others will have opinions which carry more weight than mine, but I see 
no reason it should not be fixed for *some* Python version.  Assuming no 
objections from anyone else, I suggest the best way to get this to 
happen in the short to medium term would be to open a bug with a patch. 
  A bug without a patch would also be worthwhile but would almost 
certainly cause it to be pushed back to a future 3.x version...

Cheers,

Mark


More information about the Python-Dev mailing list