From: Jean-Philippe ARGAUD Date: Wed, 14 Dec 2016 14:46:49 +0000 (+0100) Subject: Partial correction for Anomalie #11852 X-Git-Tag: V8_2_0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8475559fcb9dda562b6abcb72de258f815536f5f;p=modules%2Fadao.git Partial correction for Anomalie #11852 --- diff --git a/src/daComposant/daCore/PlatformInfo.py b/src/daComposant/daCore/PlatformInfo.py index 57438e3..0bec2ee 100644 --- a/src/daComposant/daCore/PlatformInfo.py +++ b/src/daComposant/daCore/PlatformInfo.py @@ -104,6 +104,18 @@ class PlatformInfo(object): except ImportError: return "0.0.0" + def getNloptVersion(self): + "Retourne la version de nlopt disponible" + try: + import nlopt + return "%s.%s.%s"%( + nlopt.version_major(), + nlopt.version_minor(), + nlopt.version_bugfix(), + ) + except ImportError: + return "0.0.0" + def getCurrentMemorySize(self): "Retourne la taille mémoire courante utilisée" return 1 @@ -122,6 +134,31 @@ class PlatformInfo(object): import version as dav return "%s %s (%s)"%(dav.name,dav.version,dav.date) +# ============================================================================== +try: + import matplotlib + has_matplotlib = True +except ImportError: + has_matplotlib = False + +try: + import Gnuplot + has_gnuplot = True +except ImportError: + has_gnuplot = False + +try: + import sphinx + has_sphinx = True +except ImportError: + has_sphinx = False + +try: + import nlopt + has_nlopt = True +except ImportError: + has_nlopt = False + # ============================================================================== def uniq(sequence): """ diff --git a/src/daSalome/adaoBuilder.py b/src/daSalome/adaoBuilder.py index c3225b2..2ea5c4b 100644 --- a/src/daSalome/adaoBuilder.py +++ b/src/daSalome/adaoBuilder.py @@ -636,4 +636,4 @@ class _ImportFromScript(object): # ============================================================================== if __name__ == "__main__": - print '\n AUTODIAGNOSTIC \n' + print('\n AUTODIAGNOSTIC \n') diff --git a/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py b/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py index abc5a89..09e2d2a 100644 --- a/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py +++ b/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py @@ -55,6 +55,8 @@ class AdaoEficasWrapper(eficasSalome.MyEficas): def init_gui(self): + import salome ; salome.salome_init() + eficasSalome.MyEficas.__init__(self, self.__parent, code="ADAO", module="ADAO") if useQT5: self.viewmanager.myQtab.currentChanged.connect(self.tabChanged)