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

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

On Thu, Oct 22, 2009 at 11:53 AM, Christian Heimes <lists at cheimes.de> wrote:
> Tarek Ziadé wrote:
>> 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
> PEP 370 already addresses this issue of version specific and general
> config files.
> Even if you prefer to use a different naming schema than I've suggested
> in PEP 370 you shouldn't use your suggested paths. For Unix ~/.python
> might already be used. At least it's used on my box as a script that is
> loaded through PYTHONSTARTUP to active tab completion in interactive
> Python shells. The path ~/python on Windows violates Windows naming
> schema. Application must not use the root directory of a user's home
> folder to store data. Instead you should use the application data folder.

Yes, but it doesn't address the configuration files issue.

If I make the same analogy (./local <-> /usr/local) where in .local
would I place
those files ?

Would it be ".local/etc" ?


More information about the Python-ideas mailing list