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? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -