Salome HOME
Normalize installation dir of all plugins
[modules/paravis.git] / test / VisuPrs / SWIG_scripts / C6.py
index 4aaa1104bdc26582fc9ed2ed210e0cfe2eefbfd1..696a290b5eaaa44321e28579054873dd285393a6 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2010-2013  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
 # 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
 
 from paravistest import tablesdir
 from presentations import *
-import paravis
 import pvsimple
 
-
 # 1. Import tables from file
 file_path = tablesdir + "tables_test.xls"
-table_reader = pvsimple.TableReader(FileName=file_path)
+table_reader = pvsimple.CSVReader(FileName=file_path)
 if table_reader is None:
     print "FAILED to import tables from tables_test.xls file."
 
 # 2. Create curves viewer
 cur_view = pvsimple.GetRenderView()
 if cur_view:
-    pvsimple.Delete(cur_view)
+    delete_pv_object(cur_view)
 xy_view = pvsimple.CreateXYPlotView()
 
 # 3. Display curves in the viewer
-table_reader.TableNumber = 1
 xy_rep = pvsimple.Show(table_reader)
 xy_rep.AttributeType = 'Row Data'
 xy_rep.UseIndexForXAxis = 0
@@ -47,4 +44,3 @@ xy_rep.XArrayName = 'toto 1 [s]'
 xy_rep.SeriesVisibility = [xy_rep.XArrayName, '0']
 xy_rep.SeriesVisibility = ['vtkOriginalIndices', '0']
 pvsimple.Render(xy_view)
-