Answer the question
In order to leave comments, you need to log in
Python application and settings storage
Answer the question
In order to leave comments, you need to log in
On OS X, it is better to store the settings in a plist, while ~/Library/Preferences/com.author.app_name.plist
Python can work with plists.
It's amazing how this Q&A is similar to this one ! Almost all the authors and the content of the answers are the same! The first answer is a link to the library, the second is about OS X and a note about unnecessary complication, the third is about native / Pythonic, and the fourth is about similarity!
You can store user settings (at least the sqlite file itself, if data sharing between users is not required) in the os.path.join(site.getuserbase(), 'appname') directory, but this does not look quite native in Windows. Here is a platform-independent solution how to get the path to the default settings I don’t know. Probably, nevertheless, it is necessary to analyze the platform (differences are at least *nix, WinNT <6.0 and >=6.0) and store settings and data in general in accordance with OS guides.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question