From dbf5402437f01d887b06d671d78f2eb8723ef7c5 Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Thu, 10 Jan 2013 17:24:31 +0000 Subject: [PATCH] pour Dico --- InterfaceQT4/eficas_go.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index 5cba619c..071a5e55 100644 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -76,7 +76,7 @@ def lance_eficas_ssIhm(code=None,fichier=None,ssCode=None,version=None): monEditeur=JDCEditor(Eficas,fichier) print monEditeur.cherche_Groupes() -def lance_eficas_param(code='Adao',fichier='/local/noyret/Eficas_ASTER/adao.comm',version='V0'): +def lance_eficas_param(code='Adao',fichier=None,version='V0',macro='ASSIMILATION_STUDY'): """ Lance l'appli EFICAS pour trouver les noms des groupes """ @@ -98,11 +98,9 @@ def lance_eficas_param(code='Adao',fichier='/local/noyret/Eficas_ASTER/adao.comm from editor import JDCEditor monEditeur=JDCEditor(Eficas,fichier) - texte=monEditeur.get_text_JDC('python') - texte2='jdc+"'+loadJDC(fichier)+'"' - print texte2 - parameters=getJdcParameters(texte,'ASSIMILATION_STUDY') - #print getJdcParameters(texte,'CHECKING_STUDY') + texte=loadJDC(fichier) + parameters=getJdcParameters(texte,macro) + return parameters def getJdcParameters(jdc,macro): """ @@ -128,7 +126,8 @@ def loadJDC(filename): fcomm=open(filename,'r') jdc = "" for line in fcomm.readlines(): - jdc+="%s"%line + if not (line[0]=='#'): + jdc+="%s"%line # Warning, we have to make sure that the jdc comes as a simple # string without any extra spaces/newlines -- 2.39.2