Commit 09633c16 authored by Andrew Maclean's avatar Andrew Maclean

A fix to enable this script to work with Py3k.

parent 92220d4a
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment