Salome HOME
Switch development flag to 1
[modules/hexablock.git] / doc / pyplots / test_propagation.py
index 0e6cb33c0333d2f87d103a1184621c0245a490b3..3c4343e44e938e1cd580f45df3f5c7a28f2cca86 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+# Copyright (C) 2009-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
@@ -24,7 +24,7 @@ import GEOM
 import SALOMEDS
 import hexablock
 
-print "test propagation..."
+print("test propagation...")
 doc = hexablock.addDocument()
 
 size_x = 2
@@ -41,21 +41,21 @@ for nro in range(doc.countPropagation()):
     prop = doc.getPropagation(nro)
     edges = prop.getEdges()
 
-    print("____________________________________ Prop nro %d" % (nro))
+    print(("____________________________________ Prop nro %d" % (nro)))
     for edge in edges:
 # test impossible en python car impossible de recuperer le nom des vertex
         if edge.getWay():
-            print "( ", edge.getVertex(0).name, ",", edge.getVertex(1).name, " )"
+            print(("( ", edge.getVertex(0).name, ",", edge.getVertex(1).name, " )"))
         else:
-            print "( ", edge.getVertex(1).getName(), ",", edge.getVertex(0).getName(), " )"
+            print(("( ", edge.getVertex(1).getName(), ",", edge.getVertex(0).getName(), " )"))
         pass
     pass
 
 
 
 file_name = os.path.join(os.environ['TMP'], 'propagation.vtk')
-doc.saveVtk(file_name)
+####  doc.saveVtk(file_name)
 
-print "...test propagation OK"
+print("...test propagation OK")