|
From: Fuzzyman <fuz...@vo...> - 2006-02-28 15:58:54
|
George Flaherty wrote:
>
> -----Original Message-----
> From: con...@li...
> [mailto:con...@li...] On Behalf Of
> Michael Foord
> Sent: Monday, February 27, 2006 3:31 PM
> To: con...@li...
> Subject: Re: [Configobj-develop] General Questions.
>
> George Flaherty wrote:
> > I have been evaluating ConfigObj4 and I was wondering if you could
> answer two questions.....
> >
> > 1. Can I have an ini file with empty values and some other values?
> Or am I missing some default option?
> > Assume I have the following property file (notice no sections)
> >
> > foobar.mapfile=junk
> > #Path to the .xml mapfile
> >
> > foobar.mapfile.name=morejunk
> > #Path to the mapfile
> >
> > foobar.export.csvpath=
> > #Path to the csv directory
> >
> >
> Empty values are not currently supported by ConfigObj. Are they
> standard in most other tools that use an 'ini style' format ?
>
> I've never come across them before, but this is the second question
> about them in as many weeks.
>
>
> [George]
> Yeah....I really shouldn't call this an ini file, it's really a
> property file. In my case which might not be standard, I could run
> into an empty value within a key=value pair.
>
> Yet there is a happy ending to this issue. I wrote a java subclass
> which writes out "these" property files, and enforced that all values
> of the key=value pairs will have some type of value. Now I can
> successfully parse the property file with ConfigObj4...
>
Great.
Note that the following is perfectly valid for ConfigObj :
key = ''
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
> Thanks for your help. I will now review the ConfigObj4 code to see if
> I can modify it for ${value} vs %(value)s
>
> george
>
> [/George]
>
>
>
>
>
>
|