[Python-Dev] Fixing #7175: a standard location for Python config files

Russell E. Owen rowen at uw.edu
Thu Aug 12 07:00:41 CEST 2010


In article <4C62C01D.6000900 at netwok.org>,
 Éric Araujo <merwok at netwok.org> wrote:

> Hello list
> 
> Tarek opened a distutils bugs in http://bugs.python.org/issue7175 that
> evolved into a discussion about the proper location to use for config files.
> 
> Distutils uses [.]pydistutils.cfg and .pypirc, and now unittest2 has a
> config file too.
> 
> It would be nice to define one standard location for config files used
> by stdlib modules, and maybe also by third-party programs related
> closely to Python development (testing tools, static code checkers and
> the like), in a way that doesn’t clutter the user home directory with a
> dozen dotfiles while still being easily found.
> 
> (The Unix notions of dotfiles and home directory have to be adapted to
> use non-dotfiles in some standard place on various Windows. The Mac
> experts disagree on the right directory to use.)
> 
> Tarek, Antoine, RDM, MAL were +1 on using ~/.python (whether to use
> .pythonx.y or .python/x.y is a subissue to discuss after general agreement).
> 
> What do you think about this?

I like the idea as long as different versions of python have different 
directories and the files are intended to be user-specific.

If the files are shared among all users then /usr/local/<something> 
seems more reasonable.

I also think whatever you choose for linux is also the best choice for 
Mac OS X (my preferred platform). While there are other possible 
directories, such as ~/Library/Application Support/<something>, all 
tools derived from unix that I know about use the unix convention (ssh, 
X11, bash...) and I would argue that Python is close enough to count 
even though it is a framework build. Put another way, copying the unix 
convention is simple, is exactly what power users would expect and I 
don't see it would do any harm.

-- Russell



More information about the Python-Dev mailing list