[Python-Dev] PEP about sys.implementation and implementation specific user site directory

Nick Coghlan ncoghlan at gmail.com
Tue Oct 13 11:49:44 CEST 2009


M.-A. Lemburg wrote:
>> sys.userdirsuffix
>> -----------------
>>
>> sys.userdirsuffix is an implementation and platform specific string that
>> is used to construct the path for the user site directory as explained
>> in PEP 370. The string contains the implementation name as well as the
>> version number of Python.
> 
> Don't we already have this information available as site.getuserbase()/
> site.getusersitepackages() ?

No, the new attribute is intended to allow a VM implementation to
customise the way site.py calculates the user directories so that
CPython, Jython, IronPython, etc, don't have to share the same directory.

CPython will stick with the directory as named in PEP 370 (since we
already released a version with that behaviour), but the other
implementations will be able to choose a name that doesn't conflict with it.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list