Salome HOME
[PY3] 2to3 results
[modules/smesh.git] / src / Tools / MeshCut / meshcut_plugin.py
index c5abe768acb477e58d2a1bd835d11b71f7347623..a233673b8b6ce5e3b500adc6c7eb2c0ef55f01c9 100644 (file)
@@ -50,7 +50,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
@@ -97,11 +97,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())]