From: eficas <> Date: Wed, 17 Nov 2004 10:43:45 +0000 (+0000) Subject: PN: Pour ajout de parametres de la forme : P1=[2,9,0] X-Git-Tag: CCAR_poursuite_deb~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8925d4f627f848dd72b1393cf2050369d749de1d;p=tools%2Feficas.git PN: Pour ajout de parametres de la forme : P1=[2,9,0] --- diff --git a/generator/generator_python.py b/generator/generator_python.py index 40080215..b56057f0 100644 --- a/generator/generator_python.py +++ b/generator/generator_python.py @@ -32,6 +32,7 @@ from Accas import ETAPE,PROC_ETAPE,MACRO_ETAPE,ETAPE_NIVEAU,JDC,FORM_ETAPE from Accas import MCSIMP,MCFACT,MCBLOC,MCList,EVAL from Accas import GEOM,ASSD,MCNUPLET from Accas import COMMENTAIRE,PARAMETRE, PARAMETRE_EVAL,COMMANDE_COMM +from Extensions.parametre import ITEM_PARAMETRE from Formatage import Formatage def entryPoint(): @@ -144,6 +145,8 @@ class PythonGenerator: return self.generJDC(obj) elif isinstance(obj,MCNUPLET): return self.generMCNUPLET(obj) + elif isinstance(obj,ITEM_PARAMETRE): + return self.generITEM_PARAMETRE(obj) else: raise "Type d'objet non prévu",obj @@ -229,6 +232,9 @@ class PythonGenerator: else: return obj.nom + ' = '+ self.generator(obj.valeur) +';\n' + def generITEM_PARAMETRE(self,obj): + return repr(obj) + def generPARAMETRE(self,obj): """ Cette méthode convertit un PARAMETRE