コード例 #1
0
ファイル: uGlobal.py プロジェクト: frogmon-dev/TIMELAPSEs
 def itemConfig(fileName, section):
     if os.path.exists(fileName):
         try:
             config = CONF(fileName)
             return config.itemsConfig(section)
         except Exception as e:
             print("itemConfig error : %s" % e)
コード例 #2
0
ファイル: uGlobal.py プロジェクト: frogmon-dev/TIMELAPSEs
 def readConfig(fileName, section, item, defult):
     if os.path.exists(fileName):
         try:
             config = CONF(fileName)
             rc = config.readConfig(section, item, defult)
             return rc
         except Exception as e:
             print("readConfig error : %s" % e)
             return defult
コード例 #3
0
ファイル: uGlobal.py プロジェクト: frogmon-dev/TIMELAPSEs
 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
コード例 #4
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