Open Fiedzia opened 10 years ago
One thing that just popped into my mind is the possibility of using os.pathsep
to allow specifying more than one configuration filename (similar to $PATH).
I think I am a fan of option b). That way we could simply add parameter defining exact implementation, keep current as a default and keep it it all easy to use, without polluting user app namespace with internal details of appconfig.
I can definitely see where you're coming from there, however I cannot just merge this yet, as I'd like to think about that some more.
There is a use, especially when packaging apps in a Linux distribution's package and having system-wide defaults that can be overridden. However, here are some issues I have with it:
~/.appname/settings.py
is the right way to go, as some consider the.app
-structure deprecated. If your app runs on a user account with a $HOME-directory, freedesktop recommends using theBaseDirectory
(which would be something like ~/.config/appname) to store configuration files. See https://github.com/mbr/repl/blob/master/repl#L37 for an example.