On 8 Dic, 11:32, RedBaron <[email protected]> wrote:
> Is there any way by which configParser's get() function can be made
> case insensitive?
If you don't care about the case of the config parameter values, you
could pre-convert the input to
configParser all in UPPER or lower letter with a file-like object like
this (NOT TESTED):
class AllUpperFile(object):
def __init__(self, fname): self.fp = file(fname)
def readline(self): return self.fp.readline().upper()
and the use configParser.readfp method to feed the file-like object to
the config parser
myConfigparser.readfp( AllUpperFile("myconnfigfile.cfg")
HTH
Ciao
----
FB
--
http://mail.python.org/mailman/listinfo/python-list