1 # -*- coding: utf-8 -*-
3 from ConfigParser import ConfigParser
5 class MyConfParser(ConfigParser):
8 for section in self.sections():
9 s=s+ "'" + section + "' : {"
10 options=self.options(section)
11 for option in options:
12 value=self.get(section,option)
13 s=s+"'%s' : %s," % (option, value)
19 return eval(self.getdicttext())
21 if __name__ == '__main__':