From: rnv Date: Thu, 1 Jun 2017 14:07:32 +0000 (+0300) Subject: Python3 porting: python3 instead python and deepcopy. X-Git-Tag: V9_0_0~6^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf9ebfec9f8e459b252a030543578f05e9287403;p=modules%2Fsmesh.git Python3 porting: python3 instead python and deepcopy. --- diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 893a28aba..74eaa0086 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -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 + "')"; diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 44cbff77a..829ba8e6e 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -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 + "')"; diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index c5fc21246..9ce830c28 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -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,