Case Sensitive Section names configparser

Jon Clements joncle at googlemail.com
Wed Dec 8 06:11:51 EST 2010


On Dec 8, 10:32 am, RedBaron <dheeraj.gup... at gmail.com> wrote:
> Is there any way by which configParser's get() function can be made
> case insensitive?

I would probably subclass dict to create a string specific, case
insensitive version, and supply it as the dict_type. See
http://docs.python.org/library/configparser.html#ConfigParser.RawConfigParser

That way your values would remain cased correctly, but lookups would
be insensitive.

hth

Jon.



More information about the Python-list mailing list