Salome HOME
Python3 porting: python3 instead python and deepcopy.
authorrnv <rnv@opencascade.com>
Thu, 1 Jun 2017 14:07:32 +0000 (17:07 +0300)
committerrnv <rnv@opencascade.com>
Thu, 1 Jun 2017 14:07:32 +0000 (17:07 +0300)
src/SMESH/SMESH_Mesh.cxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_SWIG/smeshBuilder.py

index 893a28aba659e6f8fbfb93475a251acddc4c0b97..74eaa008632d44bd204859f8f5b8ce72fc754561 100644 (file)
@@ -1475,7 +1475,7 @@ void SMESH_Mesh::ExportSAUV(const char *file,
 #ifdef WIN32
   cmd = "%PYTHONBIN% ";
 #else
-  cmd = "python ";
+  cmd = "python3 ";
 #endif
   cmd += "-c \"";
   cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')";
@@ -1487,7 +1487,7 @@ void SMESH_Mesh::ExportSAUV(const char *file,
 #ifdef WIN32
   cmd = "%PYTHONBIN% ";
 #else
-  cmd = "python ";
+  cmd = "python3 ";
 #endif
   cmd += "-c \"";
   cmd += "from medutilities import convert ; convert(r'" + medfilename + "', 'MED', 'GIBI', 1, r'" + file + "')";
@@ -1496,7 +1496,7 @@ void SMESH_Mesh::ExportSAUV(const char *file,
 #ifdef WIN32
   cmd = "%PYTHONBIN% ";
 #else
-  cmd = "python ";
+  cmd = "python3 ";
 #endif
   cmd += "-c \"";
   cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')";
index 44cbff77a89b9974ac9e027ab25c9ce86307d1fd..829ba8e6ea00183713512181be8bd17122f40c4f 100644 (file)
@@ -1283,7 +1283,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName,
 #ifdef WIN32
   cmd = "%PYTHONBIN% ";
 #else
-  cmd = "python ";
+  cmd = "python3 ";
 #endif
   cmd += "-c \"";
   cmd += "from medutilities import convert ; convert(r'" + sauvfilename + "', 'GIBI', 'MED', 1, r'" + medfilename + "')";
@@ -1293,7 +1293,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName,
 #ifdef WIN32
   cmd = "%PYTHONBIN% ";
 #else
-  cmd = "python ";
+  cmd = "python3 ";
 #endif
   cmd += "-c \"";
   cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')";
index c5fc21246eeec4e6e0e44f61b6a61eace4485f35..9ce830c28d6a544da3afdafddd489ab93af5ec5c 100644 (file)
@@ -5124,7 +5124,7 @@ class meshProxy(SMESH._objref_SMESH_Mesh):
     def __init__(self, *args):
         SMESH._objref_SMESH_Mesh.__init__(self, *args)
     def __deepcopy__(self, memo=None):
-        new = self.__class__()
+        new = self.__class__(self)
         return new
     def CreateDimGroup(self,*args): # 2 args added: nbCommonNodes, underlyingOnly
         if len( args ) == 3:
@@ -5141,7 +5141,7 @@ class submeshProxy(SMESH._objref_SMESH_subMesh):
         SMESH._objref_SMESH_subMesh.__init__(self, *args)
         self.mesh = None
     def __deepcopy__(self, memo=None):
-        new = self.__class__()
+        new = self.__class__(self)
         return new
 
     ## Compute the sub-mesh and return the status of the computation
@@ -5187,7 +5187,7 @@ class meshEditor(SMESH._objref_SMESH_MeshEditor):
         print("meshEditor: attribute '%s' NOT FOUND" % name)
         return None
     def __deepcopy__(self, memo=None):
-        new = self.__class__()
+        new = self.__class__(self)
         return new
     def FindCoincidentNodes(self,*args): # a 2nd arg added (SeparateCornerAndMediumNodes)
         if len( args ) == 1: args += False,