From db1871e1342fc9b2da1c01ef28c1f1694b17db58 Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Thu, 13 Nov 2014 14:25:40 +0000 Subject: [PATCH] pour resouder le pb de import math --- src/EFICASGUI/eficasSalome.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/EFICASGUI/eficasSalome.py b/src/EFICASGUI/eficasSalome.py index c5c6f8b4..9b521833 100644 --- a/src/EFICASGUI/eficasSalome.py +++ b/src/EFICASGUI/eficasSalome.py @@ -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() -- 2.39.2