Getting standard config directory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mardy

    #1

    Getting standard config directory

    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


Working...