ConfigParser preserving file ordering

Andrew Durdin adurdin at
Fri Oct 19 15:16:00 CEST 2007

On 10/19/07, Frank Aune <Frank.Aune at> wrote:
> Yes, but as I said I need functionality present in the standard-library, so
> sub-classing ConfigParser is the last option really.

Any particular reason you're limited to the standard library?

I've used iniparse <> before as a
drop-in replacement for ConfigParser that preserves ordering and
comments, and only falling back to ConfigParser if iniparse wasn't
present; like this:

    from iniparse.compat import *
except ImportError:
    from ConfigParser import *

As for updating ConfigParser -- like most other changes, it probably
needs a champion.


More information about the Python-list mailing list