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

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


On Thu, Oct 22, 2009 at 11:47 AM, Daniel Fetchinson
<fetchinson at googlemail.com> wrote:
>> Hello,
>>
>> 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.
>
> What configuration files exactly do you think will be stored in this
> location in the future (other than the ones for distutils)? In let's
> say today's python 2.5 or 2.6 what config files would you put there if
> this capability would be there currently?

.pythonrc for example



More information about the Python-ideas mailing list