New Thread- Supporting Multiline values in ConfigParser

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Jun 27 01:40:13 EDT 2007


En Wed, 27 Jun 2007 01:35:27 -0300, O.R.Senthil Kumaran  
<orsenthil at users.sourceforge.net> escribió:

> * Gabriel Genellina <gagsl-py2 at yahoo.com.ar> [2007-06-25 22:26:47]:
>
>> And how would you detect a multiline value?
>> Because it is not a section nor looks like a new option?
>>
>> I'd try using this:
>>
>> if not self.SECTCRE.match(line) and not self.OPTCRE.match(line) and
>> cursect is not None and optname:
>
> Thanks Gabriel, this suggestion worked and helped me understand the
> ConfigParser a bit better as well.

Good to know it worked - I was not entirely sure it would :)

-- 
Gabriel Genellina



More information about the Python-list mailing list