Is there a ConfigParser which keeps comments

Terry Reedy tjreedy at udel.edu
Wed Mar 14 18:06:30 CET 2012


On 3/14/2012 6:07 AM, Gelonida N wrote:
> Hi,
>
>
> At the moment I use ConfigParser
> http://docs.python.org/library/configparser.html
> for one of my applications.
>
>
> Now I'm looking for a library, which behaves like config parser, but
> with one minor difference.
>
> The write() mehtod should keep existing comments.

> Does anybody know or implement something like this or is there as
> switrch, that I overlooked in hte documentaiton.

Assuming that you have not overlooked anything, I would just subclass 
ConfigParser with an altered write method.

-- 
Terry Jan Reedy




More information about the Python-list mailing list