Prepare for Py3: eliminate print keyword

This commit is contained in:
DeepSOIC 2017-01-16 20:10:01 +03:00
parent 01ccd55a75
commit 366f9d576e
3 changed files with 4 additions and 5 deletions

View File

@ -159,7 +159,6 @@ class _CompoundFilter:
scale = obj.Base.Shape.BoundBox.DiagonalLength/math.sqrt(3)/math.sqrt(len(shps))
if scale < DistConfusion * 100:
scale = 1.0
print scale
obj.Shape = markers.getNullShapeShape(scale)
raise ValueError('Nothing passes through the filter') #Feeding empty compounds to FreeCAD seems to cause rendering issues, otherwise it would have been a good idea to output nothing.

View File

@ -34,7 +34,7 @@ class CompoundExplorer:
# CompoundExplorer.MSG_DIVEDOWN - child is a compound that is about to be traversed
# CompoundExplorer.MSG_BUBBLEUP - child is a compound that was just finished traversing
#it is reference to iterator class (can be useful to extract current depth, or index stack)
print ' ' * it.curDepth(), (child, msg)
print (' ' * it.curDepth(), (child, msg))
Output:
(<Compound object at 0000002FD26E5FC0>, 2)
@ -149,4 +149,4 @@ def AllLeaves(compound):
for (child, msg, it) in CompoundExplorer(compound):
if msg == it.MSG_LEAF:
output.append(child)
return output
return output

View File

@ -59,10 +59,10 @@ def substituteobj(oldobj, newobj):
if dep in deps_of_new:
#we are about to make an object newobj depends on, to depend on newobj.
#This will create a circular graph, so we must skip this.
print "not replacing "+oldobj.Name+" with " + newobj.Name +" in " + dep.Name
print ("not replacing "+oldobj.Name+" with " + newobj.Name +" in " + dep.Name)
list_not_replaced.append(dep)
else:
print "replacing "+oldobj.Name+" with " + newobj.Name +" in " + dep.Name
print ("replacing "+oldobj.Name+" with " + newobj.Name +" in " + dep.Name)
list_replaced.append(dep)
replaceobj(dep, oldobj, newobj)
return (list_replaced, list_not_replaced)