Salome HOME
Merge branch 'abn/port_pv42' into abn/rearch
[modules/paravis.git] / test / demo1.py
index 59a4cfdcdc827e3171e9ec78fa7095e1ec7b301a..d3aa0641d90b064a3319aeaee15bdaf0c8a57e38 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2010-2012  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2014  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
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-
 if not ('servermanager' in dir()):
   from pvsimple import *
-
-import os
+  
+import os, inspect
 
 def demo1(impth):
     """Simple demo that create the following pipeline
@@ -66,8 +65,9 @@ def demo1(impth):
     Render()
 
     
-testdir = os.getenv("TESTDIR")
-pvdata = os.getenv("PVDATA")
+scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
+testdir = os.path.dirname( os.path.abspath(scriptdir) )
+
 
 if __name__ == "__main__":
-  demo1(impth =testdir+"/Pic/")
+    demo1(impth =testdir+"/Pic/")