Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should settings files be stored?

I'm writing an application in python (using wxPython for the gui) and I'm looking for a platform independent way to decide where to store application settings files. On linux systems, where is it customary to store application settings files? How about on Mac, and Windows (all modern versions)?

Ideally I'd like to have a module that provides a platform agnostic interface to locate these files. Does something like this already exist?

like image 204
David Morton Avatar asked Jan 20 '23 21:01

David Morton


2 Answers

wxPython has your back. You want wx.StandardPaths. There's a good example included with the wxPython demo.

like image 111
Mike Driscoll Avatar answered Jan 23 '23 09:01

Mike Driscoll


There is a standard for this by freedesktop.org that you may find useful:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

like image 35
Fabian Avatar answered Jan 23 '23 09:01

Fabian