python: TemplatePyMod: *.py: Fix python3 syntax

This commit is contained in:
Priit Laes
2016-03-12 15:11:25 +02:00
committed by wmayer
parent f0188ae8ad
commit 171d908615
5 changed files with 17 additions and 17 deletions

View File

@@ -20,7 +20,7 @@ def PlaceBox(x,y,z):
return mbox
def Sierpinski(level,x0,y0,z0):
#print threading.current_thread().name
#print(threading.current_thread().name)
boxnums = pow(3,level)
thirds = boxnums / 3
twothirds = thirds * 2
@@ -95,7 +95,7 @@ def makeMengerSponge_mt(level=3,x0=0,y0=0,z0=0):
threads.append(thr)
args=args[count:]
print "Number of threads: %i" % (len(threads))
print("Number of threads: %i" % (len(threads)))
for thr in threads:
thr.start()
for thr in threads:
@@ -106,11 +106,11 @@ def makeMengerSponge_mt(level=3,x0=0,y0=0,z0=0):
mesh.addMesh(thr.mesh)
del thr.mesh
print mesh
print(mesh)
mesh.removeDuplicatedPoints()
mesh.removeFacets(mesh.getInternalFacets())
mesh.rebuildNeighbourHood()
print "Mesh is solid: %s" % (mesh.isSolid())
print("Mesh is solid: %s" % (mesh.isSolid()))
Mesh.show(mesh)
@@ -121,5 +121,5 @@ def makeMengerSponge(level=3,x0=0,y0=0,z0=0):
mesh.removeDuplicatedPoints()
mesh.removeFacets(mesh.getInternalFacets())
mesh.rebuildNeighbourHood()
print "Mesh is solid: %s" % (mesh.isSolid())
print("Mesh is solid: %s" % (mesh.isSolid()))
Mesh.show(mesh)