On Sat, Dec 6, 2008 at 5:31 PM, <[EMAIL PROTECTED]> wrote:
> Hello, Jorge
>> Hi I did a quick look at this and notice your using pyparsing. Since
>> you already have an external dependency why don't you go with
>> ConfigObj, as it has already solved the writing comments problem as
>> well as many others http://www.voidspace.org.uk/python/configobj.html
>> I'm not sure if you want the extended syntax why not use stdapi and
>> drop the external dependency?
> I reviewd ConfigObj and ConfigParser before using pyparsing. The problem is
> that the souce format is not exactly an INI file: entries have not value. I
> could subclass RawConfigParser, but when it writes, it doesn't preserve
> comments or spaces. ConfigObject would require deeper changes, and with its
> nested sections it offers too much.
but that's the beauty of ConfigObject, the extended syntax is totally
optional, and it will solve your comments problem.
> I want that ini manage intelligently the comments: if you delete a section or
> item, the previous comment block should be deleted too. Since it is a small
> plug-in with a simple language, after that I can think of writing (oh, the
> pain!) its own parser.
well yea I agree pyparsing is great, but I was just thinking that if
the reason you choose that external dep was writing comments you may
as well use a well tested solution. But hey fif you want to reinvent
that wheel that's fine, as long as the pyparsing version works right.
> Ing. José Dinuncio
> Unidad de Redes Telemáticas
> Universidad de Carabobo
Repoze-dev mailing list