fixed python2.x print statements

This commit is contained in:
Luke Campagnola 2013-02-24 15:24:42 -05:00
parent 4fad8fa3d2
commit d33fe05479
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ def plot():
#plt.addItem(item) #plt.addItem(item)
dt = pg.ptime.time() - start dt = pg.ptime.time() - start
print "Create plots took: %0.3fms" % (dt*1000) print("Create plots took: %0.3fms" % (dt*1000))
## Plot and clear 5 times, printing the time it took ## Plot and clear 5 times, printing the time it took
for i in range(5): for i in range(5):
@ -72,7 +72,7 @@ def fastPlot():
plt.addItem(item) plt.addItem(item)
dt = pg.ptime.time() - start dt = pg.ptime.time() - start
print "Create plots took: %0.3fms" % (dt*1000) print("Create plots took: %0.3fms" % (dt*1000))
## Plot and clear 5 times, printing the time it took ## Plot and clear 5 times, printing the time it took
@ -82,7 +82,7 @@ if hasattr(pg, 'arrayToQPath'):
fastPlot() fastPlot()
app.processEvents() app.processEvents()
else: else:
print "Skipping fast tests--arrayToQPath function is missing." print("Skipping fast tests--arrayToQPath function is missing.")
plt.autoRange() plt.autoRange()

View File

@ -451,7 +451,7 @@ class ViewBox(GraphicsWidget):
if item is None: if item is None:
bounds = self.childrenBoundingRect(items=items) bounds = self.childrenBoundingRect(items=items)
else: else:
print "Warning: ViewBox.autoRange(item=__) is deprecated. Use 'items' argument instead." print("Warning: ViewBox.autoRange(item=__) is deprecated. Use 'items' argument instead.")
bounds = self.mapFromItemToView(item, item.boundingRect()).boundingRect() bounds = self.mapFromItemToView(item, item.boundingRect()).boundingRect()
if bounds is not None: if bounds is not None: