ConfigParser shootout, preliminary entry

Michael Foord fuzzyman at gmail.com
Mon Oct 18 08:58:04 EDT 2004


Istvan Albert <ialbert at mailblocks.com> wrote in message news:<-JSdna307N6Pqe7cRVn-qQ at giganews.com>...
> From the docs:
> 
>  > "The config module can read config files in Microsoft's ini file format,
>  > java's properties file format, or its own python config format -- these
>  > can even be mixed."
> 
> To me this does not sound appealing. People might just end
> up being confused of what the actual file format is.
> All these formats are so simple that supporting them all
> only makes the usage more complicated.
> 


I don't think this is a problem. ini file format is simple enough - if
people just want a simple config file format the following is
straightforward enough :

[section name]
keyword = value

However the fact that it can support alternative formats is a good
thing. The important thing then becomes how good is the documentation.
If you document the simple use case first with alternatives afterwards
it should be easy enough.


>  > "as long as the components of the path are valid Python identifiers,
>  > there is a more convenient attribute syntax available:"
> 
> This means that some features can only be used if the parameter
> names are valid python identifiers, right? When I put it that way,
> it is a bit less attractive.
> 
> Istvan.

This is a valid point though. Dictionary syntax is good ;-)

Regards,

Fuzzy

http://www.voidspace.org.uk/atlantibots/pythonutils.html



More information about the Python-list mailing list