Use print function for python 3 compatibility

This commit is contained in:
Tony S Yu
2012-12-26 22:21:24 -08:00
parent d77aa6034e
commit 9c4eb3a6fc
6 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ class RectangleTool(CanvasToolBase, RectangleSelector):
if on_enter is None:
def on_enter(extents):
print "(xmin=%.3g, xmax=%.3g, ymin=%.3g, ymax=%.3g)" % extents
print("(xmin=%.3g, xmax=%.3g, ymin=%.3g, ymax=%.3g)" % extents)
self.callback_on_enter = on_enter
props = dict(mec=props['edgecolor'])
@@ -210,5 +210,5 @@ if __name__ == '__main__':
rect_tool = RectangleTool(ax)
plt.show()
print "Final selection:",
print("Final selection:")
rect_tool.callback_on_enter(rect_tool.extents)
+1 -1
View File
@@ -13,7 +13,7 @@ class ColorHistogram(PlotPlugin):
def __init__(self, **kwargs):
super(ColorHistogram, self).__init__(height=400, **kwargs)
print self.help()
print(self.help())
def attach(self, image_viewer):
super(ColorHistogram, self).attach(image_viewer)
+1 -1
View File
@@ -13,7 +13,7 @@ class Crop(Plugin):
super(Crop, self).__init__(**kwargs)
self.maxdist = maxdist
self.add_widget(SaveButtons())
print self.help()
print(self.help())
def attach(self, image_viewer):
super(Crop, self).attach(image_viewer)
+1 -1
View File
@@ -25,7 +25,7 @@ class LabelPainter(Plugin):
self.add_widget(self._radius_widget)
self.add_widget(self._label_widget)
print self.help()
print(self.help())
def help(self):
helpstr = ("Label painter",
+1 -1
View File
@@ -41,7 +41,7 @@ class LineProfile(PlotPlugin):
maxdist = epsilon
self.maxdist = maxdist
self._limit_type = limits
print self.help()
print(self.help())
def attach(self, image_viewer):
super(LineProfile, self).attach(image_viewer)
+1 -1
View File
@@ -25,7 +25,7 @@ class Measure(Plugin):
self.add_widget(self._length)
self.add_widget(self._angle)
print self.help()
print(self.help())
def attach(self, image_viewer):
super(Measure, self).attach(image_viewer)