Why doesn't Python have better config support?

From: andrew cooke <andrew@...>

Date: Tue, 22 Mar 2011 19:57:41 -0300

I'm hacking together a little program and I can't find good support for a
simple configuration file.  All I am asking for is:

* It should be nicely formatted on disk so that the user can edit it

* It should exist in Python as a class with data acessed via appropriately
named attributes

* It should support lists of values (as well as named scalars)

* There hsould be some way of specifying a basic set of values so that an
entry can be egenarted if none exists

I didn't even get as far as evaluating the last of these; there doesn't seem
to be anything that meets the first three points!

In Python's basic library there are two candidates: configparser and JSON
(pickle isn't editable).  Both only meet the first requirement.

There are some third party packages that wrap configparser, but since that
doesn't support lists they don't either.  And I can't find anything that maps
from JSON to arbitrary Python objects.

Andrew