sys.prefix in COM

Mark Hammond MarkH at ActiveState.com
Tue Nov 27 22:30:09 EST 2001


Sue Giller wrote:
...

> I have finally looked into this, and I wonder if there might be a 
> problem in sys.prefix in COM.  I am a python wannabe, so I am not 
> sure if the following is expected or what.

...

There is!  This has been fixed in Python 2.2 - sys.prefix will (almost) 
always be set correctly, even in embedded situations.

 From the CVS log for PC/getpathp.c:

Revision : 1.25
Date : 2001/9/7 14:8:1
Author : 'mhammond'
State : 'Exp'
Lines : +35 -1
Description :
Fix bug #410274 - sys.prefix isn't always set.

If after calculating sys.path we do not have sys.prefix set, we loop 
over all path entries checking if one can point to our home directory.


Mark.




More information about the Python-list mailing list