code: def get_keys(self):
          '''
          获取配置并检查是否更改
          '''
          if not os.path.exists(PATH_CONFIG):
              with open(PATH_CONFIG, 'w') as F:
                  F.write(CONFIG)
          else:
              config = ConfigParser.ConfigParser()
              with open(PATH_CONFIG, 'r') as cfgfile:
                  config.readfp(cfgfile)
                  options = config.options('key')
                  for option in options:
                      option = option.upper()
                      if option in KEYS:
                          KEYS[option] = config.get('key', option)
          return KEYf get_keys(self):
          '''
          获取配置并检查是否更改
          '''
          if not os.path.exists(PATH_CONFIG):
              with open(PATH_CONFIG, 'w') as F:
                  F.write(CONFIG)
          else:
              config = ConfigParser.ConfigParser()
              with open(PATH_CONFIG, 'r') as cfgfile:
                  config.readfp(cfgfile)
                  options = config.options('key')
                  for option in options:
                      option = option.upper()
                      if option in KEYS:
                          KEYS[option] = config.get('key', option)
          return KEYS
docs: 获取配置并检查是否更改