Salome HOME
Porting to Python 3 (1st draft)
authorGilles DAVID <gilles-g.david@edf.fr>
Wed, 29 Mar 2017 16:20:49 +0000 (18:20 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Wed, 29 Mar 2017 16:20:49 +0000 (18:20 +0200)
doc/salome/examples/hexoticsubdom1.py
doc/salome/examples/hexoticsubdom2.py
doc/salome/examples/hexoticsubdom3.py
src/HexoticPlugin/HexoticPLUGINBuilder.py

index 8781911393d14d79f0627d59931498acec96943f..a29aedb6c9711a2380a118731264fe32aca5d0cc 100644 (file)
@@ -51,7 +51,7 @@ aFilter2 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT
 aFilter3 = smesh.GetFilter(SMESH.VOLUME,SMESH.FT_BelongToGeom,'=',Sphere_1, SMESH.FT_LogicalNOT)
 
 # Create mesh of Cut_2 with sd mode 1
-print "Create mesh of Cut_2 with sd mode 1"
+print("Create mesh of Cut_2 with sd mode 1")
 Mesh_mghexa_sd1 = smesh.Mesh(Cut_2, "Mesh_mghexa_sd1")
 
 # Create the 2D algo: MG-CADSurf with geometrical mesh
index 500270ae6633e0b5b0baf1e649773b12395f584a..0bb36ad7d832b799ecc8caf9f54b945f12859445 100644 (file)
@@ -50,7 +50,7 @@ aFilter2 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT
 aFilter3 = smesh.GetFilter(SMESH.VOLUME,SMESH.FT_BelongToGeom,'=',Sphere_1, SMESH.FT_LogicalNOT)
 
 # Create mesh of Cut_2 with sd mode 2
-print "Create mesh of Cut_2 with sd mode 2"
+print("Create mesh of Cut_2 with sd mode 2")
 Mesh_mghexa_sd2 = smesh.Mesh(Cut_2, "Mesh_mghexa_sd2")
 
 # Create the 2D algo: MG-CADSurf with geometrical mesh
index ef7cc20328eaf4a08b77a735388ff6963d75e2f6..1eb998015a22f377cf65304377b4e047dd3d71ec 100644 (file)
@@ -50,7 +50,7 @@ aFilter2 = smesh.GetFilterFromCriteria([smesh.GetCriterion(SMESH.VOLUME,SMESH.FT
 aFilter3 = smesh.GetFilter(SMESH.VOLUME,SMESH.FT_BelongToGeom,'=',Sphere_1, SMESH.FT_LogicalNOT)
 
 # Create mesh of Cut_2 with sd mode 3
-print "Create mesh of Cut_2 with sd mode 3"
+print("Create mesh of Cut_2 with sd mode 3")
 Mesh_mghexa_sd3 = smesh.Mesh(Cut_2, "Mesh_mghexa_sd3")
 
 # Create the 2D algo: MG-CADSurf with geometrical mesh
index 7fd42cead0a8bb5f027e9851159de80cd5c30a1a..684f63876ac496f953d7648effd7618dc9bddbd5 100644 (file)
@@ -70,7 +70,7 @@ class Hexotic_Algorithm(Mesh_Algorithm):
     #              if it is @c 0 (default), the algorithm is assigned to the main shape
     def __init__(self, mesh, geom=0):
         Mesh_Algorithm.__init__(self)
-        if noHexoticPlugin: print "Warning: HexoticPlugin module unavailable"
+        if noHexoticPlugin: print("Warning: HexoticPlugin module unavailable")
         self.Create(mesh, geom, MG_Hexa, "libHexoticEngine.so")
         self.params = None
         pass
@@ -100,7 +100,7 @@ class Hexotic_Algorithm(Mesh_Algorithm):
     def SetSizeMap(self, theObject, theSize):
         AssureGeomPublished( self.mesh, theObject )
         if theSize <= 0:
-          raise ValueError, "The size must be > 0"
+          raise ValueError("The size must be > 0")
         self.Parameters().SetSizeMap(theObject, theSize)
         return self.Parameters()
       
@@ -125,7 +125,7 @@ class Hexotic_Algorithm(Mesh_Algorithm):
     #  @param quad not documented
     #  @return hypothesis object
     def MinMaxQuad(self, min=3, max=8, quad=True):
-        print "WARNING: Function MinMaxQuad is deprecated, use SetMinMaxHexes instead"
+        print("WARNING: Function MinMaxQuad is deprecated, use SetMinMaxHexes instead")
         return self.SetMinMaxHexes(min, max)
       
     ## Defines "ViscousLayers" hypothesis to give MG-Hexa parameters