Getting standard config directory

Mardy mardy at users.sourceforge.net
Tue Nov 22 11:28:18 EST 2005


Hi,
  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)?


-- 
Saluti,
    Mardy
http://interlingua.altervista.org




More information about the Python-list mailing list