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

M.-A. Lemburg mal at egenix.com
Tue Oct 13 12:27:57 CEST 2009


Nick Coghlan wrote:
> 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.

Ah, so it's intended to provide information to site.getuserbase()/
site.getusersitepackages() ?

Still, since that path name component is used in other contexts
as well, wouldn't it be better to have all those contexts use the
name ?!

Python has always used the (lib|include)/pythonX.Y/ path naming
scheme on Unix, but it's not codified anywhere. A sys attribute
or a set of such attributes would be good way to do so.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 13 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list