Salome HOME
Set dev version marker to 1.
[modules/paravis.git] / test / VisuPrs / dump_study / B5.py
index 1090e9cd98fbe9478748faa750e4638d3cba668c..85edfa8d2caf68b40a2d3ae6538aa12c8cdf2c5e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -23,33 +23,31 @@ import os
 import sys
 import salome
 
-class SalomeSession(object):
-    def __init__(self):
-        import runSalome
-        import sys
-        sys.argv += ["--show-desktop=1"]
-        sys.argv += ["--splash=0"]
-        sys.argv += ["--modules=MED,VISU,PARAVIS"]
-        clt, d = runSalome.main()
-        port = d['port']
-        self.port = port
-        return
-    pass
+class SalomeSession(object):
+    def __init__(self):
+        import runSalome
+        import sys
+        sys.argv += ["--show-desktop=1"]
+        sys.argv += ["--splash=0"]
+        sys.argv += ["--modules=MED,VISU,PARAVIS"]
+        clt, d = runSalome.main()
+        port = d['port']
+        self.port = port
+        return
+    pass
 
 
 # 1. Opening saved study
 
 # run Salome
-salome_session = SalomeSession()
+#salome_session = SalomeSession()
 salome.salome_init()
+salome.myStudyManager.Close(salome.myStudy)
 
 file_name = os.path.join(os.path.dirname(sys.argv[0]), "test1.hdf")
 opened_study = salome.myStudyManager.Open(file_name)
 salome.myStudy = opened_study
 
-# 2. Load PARAVIS module
-import pvserver as paravis
-
 # 3. Find IsoSurfaces
 from pvsimple import *
 obj = FindSource('IsoSurfaces')
@@ -59,7 +57,7 @@ if obj is None:
 # 4. Remove med reader object and all other sources
 for obj in GetSources().values():
     Delete(obj)
-    
+
 # 5. Check results
 obj = FindSource('ScalarMap')
 if obj is not None: