| | |
| | | for i, strValue in enumerate(rowList):
|
| | | if i == 0:
|
| | | continue
|
| | | fieldName = fieldList[i][1]
|
| | | strValue = strValue.lstrip().rstrip()
|
| | | if strValue.isdigit():
|
| | | configValue = int(strValue)
|
| | | elif (strValue.startswith("{") and strValue.endswith("}")) \
|
| | | or (strValue.startswith("[") and strValue.endswith("]")) \
|
| | | or (strValue.startswith("(") and strValue.endswith(")")):
|
| | | configValue = eval(strValue)
|
| | | elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
|
| | | configValue = self.__StrToDict(strValue)
|
| | | elif ChConfig.Def_Str_Montant in strValue:
|
| | | configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
|
| | | elif strValue in ["-", ""]:
|
| | | configValue = ""
|
| | | else:
|
| | | configValue = self.__ToFloat(strValue)
|
| | | try:
|
| | | fieldName = fieldList[i][1]
|
| | | strValue = strValue.lstrip().rstrip()
|
| | | if strValue.isdigit():
|
| | | configValue = int(strValue)
|
| | | elif (strValue.startswith("{") and strValue.endswith("}")) \
|
| | | or (strValue.startswith("[") and strValue.endswith("]")) \
|
| | | or (strValue.startswith("(") and strValue.endswith(")")):
|
| | | configValue = eval(strValue)
|
| | | elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
|
| | | configValue = self.__StrToDict(strValue)
|
| | | elif ChConfig.Def_Str_Montant in strValue:
|
| | | configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
|
| | | elif strValue in ["-", ""]:
|
| | | configValue = ""
|
| | | else:
|
| | | configValue = self.__ToFloat(strValue)
|
| | | except BaseException:
|
| | | ErrLog("SetIpyDataError: tableName=%s,key=%s,i=%s,value=%s" % ("FuncConfig", key, i, strValue))
|
| | | raise
|
| | | setattr(funcConfigObj, fieldName, configValue)
|
| | | self.ipyFuncConfigDict[key] = funcConfigObj
|
| | | return
|