ConfigParser Help

Karthikesh Raju karthik at james.hut.fi
Mon Oct 14 20:38:39 CEST 2002


Hi,

i would like to get some help with ConfigParser module. Currenly say,
i have an ini file as

[a]
noofusers = 10
noofsources = 20

[b]
noofusers = 10
noofsources = 20

currenly i do something like 

c = cfg.LoadConfig('file.ini') and i get

c -  a dictionary whos elements are

{'a.noofusers':'10','a.noofsources':'20','b.noofusers':'10','b.noofsources':'20'}

well, i can live with this but would really be happy with variables a
dictionary of the sections and its subsections as keys with the RHS
the values for the keys.

Thankx in advance
karthik



More information about the Python-list mailing list