ANN: New configuration module released

Vinay Sajip vinay_sajip at red-dove.com
Thu Nov 4 06:30:40 EST 2004


Hung Jung Lu wrote:
> I know you probably want a lot of features, but then different people
> want different things. What a person considers necessary, others may
> find them unnecessary, and vice versa.

I'm not sure what you mean by 'lots of features'. Primarily, I wanted 
better ease of use than ConfigParser gives me for medium-complexity 
configurations.

> 
> Microsoft went from .INI files to Windows registry, and now to
> XML-based app.config files in the .NET world. I know app.config files
> are not the best thing with the cleanest format, but, why re-invent
> the wheel?

Microsoft did. You may remember, when the registry first appeared in 
Windows, many viewed it as some kind of panacea - it's the same thing 
now with .NET configuration files. Do you really believe that they are 
the last word in application configuration? I don't. Of course, they are 
quite usable, and have a lot of momentum since anything done by 
Microsoft does, but that's hardly a reason for people to stop trying 
alternative approaches.

> Microsoft's XML-based app.config is guaranteed to be widely used. For
> something as minor as configuration files, for people that juggle
> between many programming languages, I guess it's an OK solution.
> I know many people may not like the XML overhead, I know many people
> don't like Microsoft. But when you have to use hierarchical
> configuration files across many programming languages, I don't know
> any format out there that can compete with app.config. To me, the war
> is already over.

Which war would that be? Horses for courses, of course. XML is 
technically suitable, and the .NET System.Configuration format will seem 
like a de facto standard for many people. I've used it myself on many a 
.NET project. (Normally, end users are not expected to edit these 
configuration files, as they are XML tyros and moreover, cannot be 
expected to understand the System.Configuration schema.)

If you'd rather use the .NET format for your Python application 
configuration, fine!

Best wishes,


Vinay Sajip



More information about the Python-list mailing list