From 8925d4f627f848dd72b1393cf2050369d749de1d Mon Sep 17 00:00:00 2001 From: eficas <> Date: Wed, 17 Nov 2004 10:43:45 +0000 Subject: [PATCH] PN: Pour ajout de parametres de la forme : P1=[2,9,0] --- generator/generator_python.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.39.2