Getting standard config directory

M

Mardy

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,270
Messages
2,571,353
Members
48,038
Latest member
HunterDela

Latest Threads

Top