From b6db7c9e9ad2f8d03cfc427fb0397d2077df5313 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Fri, 31 Mar 2017 10:52:11 +0200 Subject: [PATCH] Python3: doc --- doc/cas_test_python/BIELLE.py | 32 ++++++++++++++++---------------- doc/pyplots/test_propagation.py | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/cas_test_python/BIELLE.py b/doc/cas_test_python/BIELLE.py index e80374b..49123f6 100644 --- a/doc/cas_test_python/BIELLE.py +++ b/doc/cas_test_python/BIELLE.py @@ -964,31 +964,31 @@ for j in range(N_Propa): print(" --- MAILLAGE HEXAHEDRIQUE --- ") mesh_hexas = hexablock.mesh(doc, "Bielle:hexas") -print("Nombre d hexaedres:" , mesh_hexas.NbHexas()) -print("Nombre de quadrangles:", mesh_hexas.NbQuadrangles()) -print("Nombre de segments:" , mesh_hexas.NbEdges()) -print("Nombre de noeuds:" , mesh_hexas.NbNodes()) +print(("Nombre d hexaedres:" , mesh_hexas.NbHexas())) +print(("Nombre de quadrangles:", mesh_hexas.NbQuadrangles())) +print(("Nombre de segments:" , mesh_hexas.NbEdges())) +print(("Nombre de noeuds:" , mesh_hexas.NbNodes())) print(" --- MAILLAGE QUADRANGULAIRE --- ") mesh_quads = hexablock.mesh(doc, "Bielle:quads", 2) -print("Nombre d hexaedres:" , mesh_quads.NbHexas()) -print("Nombre de quadrangles:", mesh_quads.NbQuadrangles()) -print("Nombre de segments:" , mesh_quads.NbEdges()) -print("Nombre de noeuds:" , mesh_quads.NbNodes()) +print(("Nombre d hexaedres:" , mesh_quads.NbHexas())) +print(("Nombre de quadrangles:", mesh_quads.NbQuadrangles())) +print(("Nombre de segments:" , mesh_quads.NbEdges())) +print(("Nombre de noeuds:" , mesh_quads.NbNodes())) print(" --- MAILLAGE 1D --- ") mesh_edges = hexablock.mesh(doc, "Bielle:edges", 1) -print("Nombre d hexaedres:" , mesh_edges.NbHexas()) -print("Nombre de quadrangles:", mesh_edges.NbQuadrangles()) -print("Nombre de segments:" , mesh_edges.NbEdges()) -print("Nombre de noeuds:" , mesh_edges.NbNodes()) +print(("Nombre d hexaedres:" , mesh_edges.NbHexas())) +print(("Nombre de quadrangles:", mesh_edges.NbQuadrangles())) +print(("Nombre de segments:" , mesh_edges.NbEdges())) +print(("Nombre de noeuds:" , mesh_edges.NbNodes())) print(" --- MAILLAGE des sommets --- ") mesh_nodes = hexablock.mesh(doc, "Bielle:nodes", 0) -print("Nombre d hexaedres:" , mesh_nodes.NbHexas()) -print("Nombre de quadrangles:", mesh_nodes.NbQuadrangles()) -print("Nombre de segments:" , mesh_nodes.NbEdges()) -print("Nombre de noeuds:" , mesh_nodes.NbNodes()) +print(("Nombre d hexaedres:" , mesh_nodes.NbHexas())) +print(("Nombre de quadrangles:", mesh_nodes.NbQuadrangles())) +print(("Nombre de segments:" , mesh_nodes.NbEdges())) +print(("Nombre de noeuds:" , mesh_nodes.NbNodes())) diff --git a/doc/pyplots/test_propagation.py b/doc/pyplots/test_propagation.py index f9fbacc..3c4343e 100644 --- a/doc/pyplots/test_propagation.py +++ b/doc/pyplots/test_propagation.py @@ -45,9 +45,9 @@ for nro in range(doc.countPropagation()): 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 -- 2.39.2