Salome HOME
Merge Python 3 porting.
[modules/smesh.git] / src / Tools / MeshCut / meshcut_plugin.py
index 7f47b61a5473f58281584341543a10b4a58c76a7..9af5a33778090bf1a235a2b3cf82610fdb0a8b26 100644 (file)
@@ -49,7 +49,7 @@ def MeshCut(context):
       if fd.exec_():
         infile = fd.selectedFiles()[0]
         self.ui.le_origMeshFile.setText(infile)
-        insplit = os.path.splitext(unicode(infile).encode())
+        insplit = os.path.splitext(str(infile).encode())
         outfile = insplit[0] + '_cut' + insplit[1]
         self.ui.le_cutMeshFile.setText(outfile)
       pass
@@ -96,11 +96,11 @@ and T the tolerance.
     if result:
       # dialog accepted
       args = ['MeshCut']
-      args += [unicode(window.ui.le_origMeshFile.text()).encode()]
-      args += [unicode(window.ui.le_cutMeshFile.text()).encode()]
-      args += [unicode(window.ui.le_outMeshName.text()).encode()]
-      args += [unicode(window.ui.le_groupAbove.text()).encode()]
-      args += [unicode(window.ui.le_groupBelow.text()).encode()]
+      args += [str(window.ui.le_origMeshFile.text()).encode()]
+      args += [str(window.ui.le_cutMeshFile.text()).encode()]
+      args += [str(window.ui.le_outMeshName.text()).encode()]
+      args += [str(window.ui.le_groupAbove.text()).encode()]
+      args += [str(window.ui.le_groupBelow.text()).encode()]
       args += [str(window.ui.dsb_normX.value())]
       args += [str(window.ui.dsb_normY.value())]
       args += [str(window.ui.dsb_normZ.value())]