code: def read_file(self, cfgparser, file):
          
  
          if hasattr(file, 'readline'):
              # we have a file object
              if sys.version_info >= (3, 2):
                  cfgparser.read_file(file)  # Added in Python 3.2
              else:
                  cfgparser.readfp(file)  # Deprecated since Python 3.2
  
          else:
              # we have a file name
              cfgparser.read(file)
docs: Read configuration from file.