ConfigParser subclass problem
python at p0w.org
Fri Sep 26 21:56:57 CEST 2008
I think I do something wrong, but I don't see why it doesn't work, so I
I've searched in the list archive and found this thread, that explain
exactly what I want to have: the options strings returned by
ConfigParser without being lower cased.
I tryed to reproduce this, by subclassing the SafeConfigParser class,
* in my main script:
from MyConfigParser import *
* in the MyConfigParser.py file:
from ConfigParser import SafeConfigParser
def optionxform(self, optionstr):
print "Called the modified version of the class"
then, when I run the script, every time a calls to my own class is done,
the print statment is shown in the console, so this may work, but when I
use the .items() method of the class, I got a lower cased result !
(In my test, using the .items() method is my only try to test the new class)
Does anybody has an idea of what I'm doing wrong ?
More information about the Python-list