[Python-ideas] A standard location for Python configuration files.

Tarek Ziadé ziade.tarek at gmail.com
Thu Oct 22 11:30:36 CEST 2009


As discussed in issue #7175 and on irc, I would like to propose the
addition of a new function called 'getuserconfig' in site.py.

This function will return the path to a directory that will contain
configuration files for Python.

The name I am suggesting for the path of the folder is:   ~/.python

with an alternative location for win32 : ~/python

This win32 alternative is proposed to avoid the fact that it's not
possible in some flavors of windows to manually create a
folder that starts with a dot when using file graphical browser.
That's disturbing for end users.

This will be used by Distutils to gather the configuration files it
uses right now ([py]distutils.cfg and pypirc) and gently deprecate the
old location (~)

I am bringing this discussion to python-ideas to make sure those are
the best choices, and to propose ~/[.]python as the new standard
location for any user configuration file Python currently uses or
might use in the future.


More information about the Python-ideas mailing list