On Sun, Mar 13, 2011 at 11:25 AM, Thomas G. Willis <tom.wil...@gmail.com> wrote:
> thanks for the info. i guess I'm thinking if you need something to support
> such a complex "configuration" that an ini file can't handle it, aren't you
> programming at that point and if so, why not use a real programming
> language? in java they does this stuff all the time. I know that the line is
> pretty blurry between code and configuration, but my guide has always been
> if it's versioned in your vc repo, it's code.
> just thinking out loud, but I like the simplicity of an INI other than that,
> python makes a nice dsl for that kind of stuff too, one of the few things I
> like about django is the settings.py(hate the import magic though)

There's nothing fatal about INI but it has three limitations:

- Can't express types other than strings. Can't express dicts/lists.
External routines have to parse these (asbool,
sqlalchemy.engine_from_config).

- Rigid two-level structure, can't express hierarchies.

- It's not really a multi-language standard as it claims to be: there
is no formal definition of which characters are allowed. I was
surprised when Paste started using keys containing ':'.

- Sucky ConfigParser (although it's improved in Python 2.7/3.2)

Its main advantages are:

- Less verbose than a Python module of scalar assignments, where you
have to quote the strings and can't have sections (unless you use
classes for them, but then you have the "class" keyword).

- Easier for sysadmins who don't know Python to maintain the file;
they don't have to learn Python quoting rules.

There's a feeling among some developers and many (but not all) users
that INI's disadvantages may be outweighing its advantages. YAML can
express all the things ppl wish the config file had. It can also
express a full ZCA configuration, which would allow the same file to
do app configuration, logging, and component configuration without
using ZCML.  That's what Marco was, a YAML-based version of
PasteDeploy. Its development was halted but parts of it could be
revived for a new tool.

-- 
Mike Orr <sluggos...@gmail.com>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to