mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-01 12:50:48 +08:00
Use print function for python 3 compatibility
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user