Hi Sam, Interesting point (and probably good for internal config). Just a few questions (from what I use config files for - user accessible configuration): 1. How do you deal with syntax errors when the user modifies this file? (yes, you have to deal with file format errors with flat files, but at least it is not a syntax error at load time).
2. Can a user inject undesirable code into the system and break my code / security / something? 3. Can you have a system with defaults and only set config that isn't the default value? (I think Django has this with local settings where you will do a "from settings import *" - but is this easily maintainable? Will it always get the order right? Will you be able to change e.g. just one entry in a dictionary property?) These reasons would all drive me towards using a "standard" config file, but I would be interested to hear if anyone has better options for them. Thanks, Jon On Thu, Feb 28, 2013 at 6:09 PM, Sam Watkins <[email protected]> wrote: > config files? pfft! > > In python, one may put a program's settings in a separate python file, > and simply import it (or from it import *). > > And if you just use numbers and quoted strings, > those files can be used for shell config and perhaps make config. > > Killer Feature. Works nice with python's excellent syntax and module > system :) > > A bit of a boring post, but hey... > > Sam > _______________________________________________ > melbourne-pug mailing list > [email protected] > http://mail.python.org/mailman/listinfo/melbourne-pug >
_______________________________________________ melbourne-pug mailing list [email protected] http://mail.python.org/mailman/listinfo/melbourne-pug
