示例#1
0
 def iniSectionAdd(fileName, section):
     if os.path.exists(fileName):
         try:
             config = CONF(fileName)
             config.sectionAdd(section)
             config.saveConfig()
             return True
         except Exception as e:
             print("iniSectionAdd error : %s" % e)
             return False
示例#2
0
 def writeConfig(fileName, section, item, value):
     if os.path.exists(fileName):
         try:
             config = CONF(fileName)
             config.writeConfig(section, item, value)
             config.saveConfig()
             return True
         except Exception as e:
             print("error : %s" % e)
             return False