python: Path: *.py: Fix python3 syntax
This commit is contained in:
@@ -70,8 +70,8 @@ class FreeCADTooltableHandler(xml.sax.ContentHandler):
|
||||
self.tool.Name = str(attributes["name"])
|
||||
self.tool.ToolType = str(attributes["type"])
|
||||
self.tool.Material = str(attributes["mat"])
|
||||
# for some reason without the following line I get an error
|
||||
print attributes["diameter"]
|
||||
# for some reason without the following line I get an error
|
||||
print(attributes["diameter"])
|
||||
self.tool.Diameter = float(attributes["diameter"])
|
||||
self.tool.LengthOffset = float(attributes["length"])
|
||||
self.tool.FlatRadius = float(attributes["flat"])
|
||||
@@ -122,8 +122,8 @@ class HeeksTooltableHandler(xml.sax.ContentHandler):
|
||||
self.tool.Material = "HighSpeedSteel"
|
||||
elif m == "1":
|
||||
self.tool.Material = "Carbide"
|
||||
# for some reason without the following line I get an error
|
||||
print attributes["diameter"]
|
||||
# for some reason without the following line I get an error
|
||||
print(attributes["diameter"])
|
||||
self.tool.Diameter = float(attributes["diameter"])
|
||||
self.tool.LengthOffset = float(attributes["tool_length_offset"])
|
||||
self.tool.FlatRadius = float(attributes["flat_radius"])
|
||||
@@ -654,7 +654,7 @@ class Editor(QtGui.QDialog):
|
||||
def addnew(self):
|
||||
"adds a new tool at the end of the table"
|
||||
tool = Path.Tool()
|
||||
print self.NameField
|
||||
print(self.NameField)
|
||||
if self.NameField.text():
|
||||
tool.Name = str(self.NameField.text())
|
||||
tool.ToolType = self.getType(self.TypeField.currentIndex())
|
||||
@@ -695,8 +695,8 @@ class Editor(QtGui.QDialog):
|
||||
fil.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||
fil.write(self.tooltable.Content)
|
||||
fil.close()
|
||||
print "Written ", filename[0]
|
||||
|
||||
print("Written ",filename[0])
|
||||
|
||||
def moveup(self):
|
||||
"moves a tool to a lower number, if possible"
|
||||
if self.number:
|
||||
|
||||
Reference in New Issue
Block a user