python - How to change ConfigParser.RawConfigParser module behaviour -


i want change default output of configparser.rawconfigparser.items(section) , set configparser.rawconfigparser.optionxform = str in configparser module, created own module myconfigparser inheriting configparser.rawconfigparser base class. below code think incorrect. unable use it.

import os import configparser  class myconfigparser(configparser.rawconfigparser):     """     """      configparser.rawconfigparser.optionxform = str      def items(section):         items_list = configparser.rawconfigparser.items(section)         item in item_list:             index = item_list.index(item)             if not (os.path.exists(item[1]) , os.path.isfile(item[1])):                 item_list.pop(index)         return items_list 


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -