]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
pour resouder le pb de import math
authorPascale Noyret <pascale.noyret@edf.fr>
Thu, 13 Nov 2014 14:25:40 +0000 (14:25 +0000)
committerPascale Noyret <pascale.noyret@edf.fr>
Thu, 13 Nov 2014 14:25:40 +0000 (14:25 +0000)
src/EFICASGUI/eficasSalome.py

index c5c6f8b4beb330f9b29485942ae5ccf925fb1aa2..9b521833a5ee6e02dafb2f81c1de497691fe18e6 100644 (file)
@@ -19,7 +19,7 @@ sys.path[:0]=[eficasConfig.eficasPath,
               os.path.join( eficasConfig.eficasPath,'Editeur'),
               os.path.join( eficasConfig.eficasPath,'UiQT4'),
               os.path.join( eficasConfig.eficasPath,'InterfaceQT4'),
-              os.path.join( eficasConfig.eficasPath,'Extensions'),
+              #os.path.join( eficasConfig.eficasPath,'Extensions'),
               eficasConfig.eficasPath,
              ]
 
@@ -45,7 +45,6 @@ from Extensions import localisation
 localisation.localise(None,langue)
 
 
-
 class MyEficas( qtEficas.Appli ):
     """
     Classe de lancement du logiciel EFICAS dans SALOME
@@ -110,6 +109,23 @@ class MyEficas( qtEficas.Appli ):
           return
         if hasattr(self,'readercata') :
            del self.readercata
+        import math
+        try:
+          import Numeric
+        except:
+          import numpy
+          Numeric = numpy
+
+        from Extensions.param2 import originalMath
+        Numeric.cos=originalMath.numeric_ncos
+        Numeric.sin=originalMath.numeric_nsin
+        Numeric.array=originalMath.numeric_narray
+        math.sin=originalMath.sin
+        math.cos=originalMath.cos
+        math.sqrt=originalMath.sqrt
+        math.ceil=originalMath.ceil
+        math.pi=originalMath.pi
+
         global appli
         appli = None
         event.accept()