# -*- coding: utf-8 -*-
import logging
+import os
logger=logging.getLogger()
def initialise(flog=None):
- flog = flog or '/tmp/convert.log'
+ if flog == None :
+ MonHome=os.environ['HOME']
+ MaDir=MonHome+"/Eficas_install"
+ try :
+ os.mkdir(MaDir)
+ except :
+ pass
+ try :
+ os.listdir(MaDir)
+ flog=MaDir+"/convert.log"
+ except :
+ flog='/tmp/convert.log'
+
hdlr=logging.FileHandler(flog,'w')
formatter = logging.Formatter('%(levelname)s: %(message)s')
hdlr.setFormatter(formatter)
####################### traitement CALC_FONCTION #######################
removeMotCleSiRegle(jdc,"CALC_FONCTION","NOM_PARA",((("MAX"),"existeMCFParmi"),))
renameCommandeSiRegle(jdc,"CALC_FONCTION","INFO_FONCTION", ((("RMS","MAX","NOCI_SEISME","NORME","ECART-TYPE"),"existeMCFParmi"),))
+ renameMotCleInFact(jdc,"CALC_FONCTION","LISS_ENVELOP","FONCTION","NAPPE")
####################### traitement IMPR_GENE #######################
moveMotCleFromFactToFather(jdc,"IMPR_GENE","GENE","UNITE")