Reading/Writing Config Files

Tony Meyer ta-meyer at
Fri Aug 22 00:00:18 CEST 2003

> I need to read/write config files that will be updated by
> both users as well as programs.  All config-file modules
> that I have looked at so far aren't completely satisfactory:
> 1. ConfigParser: does not preserve order of entries in the 
> config file and comments when updating the file.  This is 
> critical since people are going to be reading/updating those 
> files as well.

You might also want to read the python-dev thread about ConfigParser from
the start of the year:

(I don't know what happened to the ability to make 'surgical' changes that
was proposed, since google doesn't seem to have anything further than that
thread, and I don't read python-dev.  I gather that some improvements were
checked in and then backed out, though, so you might even find your solution
in the Python cvs history around the start of the year).

Or this one from way back in 1999:

=Tony Meyer

More information about the Python-list mailing list