New submission from Michael Müller:
It would be nice to have a 'getDict' function in the configparser lib.
Adding that function would be simply
def getDict(self, *args):
return dict([entry for entry in self.items(*args)])
inside the RawConfigParser class next to the other get*
R. David Murray added the comment:
How is this different from myconfig['section']?
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20943
___
Łukasz Langa added the comment:
Michael, what you wish is already a part of configparser. Let's use this as an
example:
p = configparser.ConfigParser()
p.read_string(
... [one]
... opt=val
... [two]
... num=1
... str=bzz
... bool=true
... )
When asking for a specific section, you get a