Getting standard config directory
mardy at users.sourceforge.net
Tue Nov 22 17:28:18 CET 2005
I'm looking for a standard way to determine where to store a
configuration file for my app, using distutils.
At the moment, I'm using os.geteuid() == 0 to decide whether the
configuration file should be written in /etc/myapp.cfg or in
$HOME/.myapp.cfg (if the user running the setup.py is root, I suppose it's
doing a global installation).
But I don't know how this will work in Windows. Is there some way to
obtain the standard path for config files (maybe from inside distutils)?
More information about the Python-list