|
From: George F. <Geo...@sa...> - 2006-02-27 19:50:15
|
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=3Djunk
#Path to the .xml mapfile
foobar.mapfile.name=3Dmorejunk
#Path to the mapfile
foobar.export.csvpath=3D
#Path to the csv directory
My test code is the following:
--------------------------------------------
from configobj import ConfigObj
import os
import string
def test():
configFile =3D =
os.path.join('C:/georgef/work/pyWork/classes','test.properties')
configHandler =3D ConfigObj(configFile)
return configHandler['marketmax.export.csvpath']
if __name__ =3D=3D '__main__':
print test()
***But this is raising a Parsing Error?
Which seems to come from the empty property of =
"foobar.export.csvpath=3D"
Am I just missing some option?
2. I am attempting to utilize a single ini file to drive python and ant =
build scripts. So it would be ideal utilize a =
"sort-of-ant/java-interpolation" if possible: Again assume I have the =
following ini file.
Myhome.dir=3DC:/foo/bar
Myhome.bin=3D${Myhome.dir}/bin
Is it possible to do something like ${value} vs. %(value)s?
Thank you
George Flaherty
|