]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
partage Eric
authorpascale.noyret <pascale.noyret@edf.fr>
Wed, 23 Jun 2021 08:20:47 +0000 (10:20 +0200)
committerpascale.noyret <pascale.noyret@edf.fr>
Wed, 23 Jun 2021 08:20:47 +0000 (10:20 +0200)
Vimmp/redefinitStep.py [new file with mode: 0644]

diff --git a/Vimmp/redefinitStep.py b/Vimmp/redefinitStep.py
new file mode 100644 (file)
index 0000000..9093038
--- /dev/null
@@ -0,0 +1,17 @@
+def newGetattr(self,name):
+    listeRetour=[]
+    for step in self.step_Vimmp:
+        if step.__class__.__name__.find('T_'+name) == 0 : 
+              listeRetour.append (step)
+    if len(listeRetour) >  0 : return listeRetour
+    raise AttributeError("%r object has no attribute %r" % (self.__class__.__name__, name))
+
+#def activeSurcharge(monType):
+#
+
+
+if __name__ == "__main__":
+    import cata_CSAndCPS_v18_karel_driver as m
+    m.T_Vimmp.__getattr__ = newGetattr
+    jdd = m.CreateFromDocument(open('test-karel.xml').read())
+    print (jdd.Component[0])