From a7f33898a085da258497244ba1697ddbeb921b73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Tue, 30 Sep 2014 10:30:23 +0200 Subject: [PATCH] simplification --- src/PV_SWIG/no_wrap/paravis.py | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/src/PV_SWIG/no_wrap/paravis.py b/src/PV_SWIG/no_wrap/paravis.py index 071649da..0562e666 100644 --- a/src/PV_SWIG/no_wrap/paravis.py +++ b/src/PV_SWIG/no_wrap/paravis.py @@ -20,35 +20,7 @@ # Module : PARAVIS # -import os, new - -import PARAVIS -import SALOME -import SALOME_Session_idl -import SALOMEDS -import SALOME_ModuleCatalog -from omniORB import CORBA -from time import sleep -import salome - -## Initialization of paravis server -def Initialize(theDelay) : - mySession = None - while mySession == None: - mySession = salome.naming_service.Resolve("/Kernel/Session") - mySession = mySession._narrow(SALOME.Session) - mySession.GetInterface() - sleep(theDelay) - myLocalParavis = salome.lcc.FindOrLoadComponent("FactoryServer", "PARAVIS") -# myLocalStudy = salome.myStudy -# myLocalParavis.SetCurrentStudy(myLocalStudy) -# myLocalParavis.ActivateModule() ## CAN NOT WORK ANYMORE, now the engine and the GUI are properly decoupled - return myLocalParavis - -# def ImportFile(theFileName): -# "Import a file of any format supported by ParaView" -# myParavis.ImportFile(theFileName) - -## Initialize PARAVIS interface -myParavisEngine = Initialize(2) +import PARAVIS_utils +## Initialize PARAVIS interface +myParavisEngine = PARAVIS_utils.getEngine() -- 2.39.2