Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21610

Re: Is there a ConfigParser which keeps comments

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Is there a ConfigParser which keeps comments
Date 2012-03-14 13:06 -0400
References <jjpql7$b70$1@dough.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.638.1331744805.3037.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Is there a  ConfigParser which keeps comments Terry Reedy <tjreedy@udel.edu> - 2012-03-14 13:06 -0400

csiph-web