From: Cédric Aguerre Date: Tue, 30 Sep 2014 08:30:23 +0000 (+0200) Subject: simplification X-Git-Tag: V7_5_0b1~27^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a7f33898a085da258497244ba1697ddbeb921b73;p=modules%2Fparavis.git simplification --- 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()