Skip to content
Snippets Groups Projects
Commit 55ab30f9 authored by Andrew Maclean's avatar Andrew Maclean Committed by David Gobbi
Browse files

A fix to enable this script to work with Py3k.

parent aa4e0d02
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,7 @@ def GetSource(dataType):
pts = vtk.vtkPoints()
sg.SetPoints(pts)
npts = input.GetNumberOfPoints()
for i in xrange(npts):
for i in range(npts):
pts.InsertNextPoint(input.GetPoint(i))
sg.GetPointData().ShallowCopy(input.GetPointData())
......@@ -97,7 +97,7 @@ def TestDataType(dataType, reader, writer, ext, numTris):
writer.SetInputConnection(s.GetOutputPort())
npieces = 16
writer.SetNumberOfPieces(npieces)
pperrank = npieces / nranks
pperrank = npieces // nranks
start = pperrank * rank
end = start + pperrank - 1
writer.SetStartPiece(start)
......@@ -130,7 +130,7 @@ def TestDataType(dataType, reader, writer, ext, numTris):
contr.AllReduce(da, da2, vtk.vtkCommunicator.SUM_OP)
if rank == 0:
print da2.GetValue(0)
print(da2.GetValue(0))
import os
os.remove(filename)
for i in range(npieces):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment