Re: ConfigParser and newlines

2009-05-15 Thread Minesh Patel
> Not as best I can tell.  From my /usr/lib/python2.5/ConfigParser.py file, > around line 441: > >  if line[0].isspace() and cursect is not None and optname: >    value = line.strip() >    if value: >      cursect[optname] = "%s\n%s" % (cursect[optname], value) > > That "value = line.strip()" is wh

Re: ConfigParser and newlines

2009-05-15 Thread Tim Chase
test.cfg [Foo_Section] BODY = Line of text 1 Continuing Line of text 1 Executing the code === Python 2.5.1 Stackless 3.1b3 060516 (release25-maint, Mar 6 2009, 14:12:34) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 Type "help", "copyright", "credits

Re: ConfigParser and newlines

2009-05-15 Thread Mike Driscoll
On May 15, 1:09 pm, Minesh Patel wrote: > I am using ConfigParser to parse a config file and I want to maintain > the newlines, how is it possible. Example given below. BTW, is there > an alternative to configParser, should I use 'exec' instead. Is there > any support for yaml built-in or possibly

ConfigParser and newlines

2009-05-15 Thread Minesh Patel
I am using ConfigParser to parse a config file and I want to maintain the newlines, how is it possible. Example given below. BTW, is there an alternative to configParser, should I use 'exec' instead. Is there any support for yaml built-in or possibly in the future? test.cfg [Foo_Secti