code: def load_from_ini(self):
          
          try:
              if PY2:
                  # Python 2
                  fname = self.filename()
                  if osp.isfile(fname):
                      try:
                          with codecs.open(fname, encoding='utf-8') as configfile:
                              self.readfp(configfile)
                      except IOError:
                          print("Failed reading file", fname)  # spyder: test-skip
              else:
                  # Python 3
                  self.read(self.filename(), encoding='utf-8')
          except cp.MissingSectionHeaderError:
              print("Warning: File contains no section headers.")
docs: Load config from the associated .ini file