On 10/19/12 11:51 AM, kampy wrote:
hi all,
my requirement is to have section with in a section in config parameters
ex:
[AAA]
[BBB]
a=1
b=1
[CCC]
a=1
b=2
Any one help me in understanding how to make sure that config file to have a
structure like this and reading with the config parser
a configuration file is a flat sequences of sections, you cannot do this
what you could do is have 2 files, and add a link from one to the other:
file1.ini:
[AAA]
extended = file2.ini
file2.ini:
[BBB]
a=1
b=1
[CCC]
a=1
b=2
then create a bit of logic on the top of ConfigParser to read back those
values
HTH
Tarek
--
http://mail.python.org/mailman/listinfo/python-list