Commit 16876f45 authored by Jerome Flesch's avatar Jerome Flesch

s/print/print()/

Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@gmail.com>
parent 60c9d20b
......@@ -16,9 +16,9 @@ from pyocr import pyocr
tools = pyocr.get_available_tools()[:]
if len(tools) == 0:
print "No OCR tool found"
print("No OCR tool found")
sys.exit(1)
print "Using '%s'" % (tools[0].get_name())
print("Using '%s'" % (tools[0].get_name()))
tools[0].image_to_string(Image.open('test.png'), lang='fra',
builder=TextBuilder())
......
......@@ -13,26 +13,26 @@ from tests import tests_tesseract
if __name__ == '__main__':
for tool in pyocr.TOOLS:
print "- OCR: %s" % tool.get_name()
print("- OCR: %s" % tool.get_name())
available = tool.is_available()
print " is_available(): %s" % (str(available))
print(" is_available(): %s" % (str(available)))
if available:
print " get_version(): %s" % (str(tool.get_version()))
print " get_available_languages(): ",
print(" get_version(): %s" % (str(tool.get_version())))
print(" get_available_languages(): ")
for lang in tool.get_available_languages():
print ("%s, " % (lang)),
print ""
print ""
print("%s, " % (lang))
print("")
print("")
print "OCR tool found:"
for tool in pyocr.get_available_tools():
print "- %s" % tool.get_name()
print("- %s" % tool.get_name())
if tesseract.is_available():
print "---"
print "Tesseract:"
print("---")
print("Tesseract:")
unittest.TextTestRunner().run(tests_tesseract.get_all_tests())
if cuneiform.is_available():
print "---"
print "Cuneiform:"
print("---")
print("Cuneiform:")
unittest.TextTestRunner().run(tests_cuneiform.get_all_tests())
......@@ -5,8 +5,8 @@ cuneiform.py is a wrapper for Cuneiform
USAGE:
> from PIL import Image
> from cuneiform import image_to_string
> print image_to_string(Image.open('test.png'))
> print image_to_string(Image.open('test-european.jpg'), lang='fra')
> print(image_to_string(Image.open('test.png')))
> print(image_to_string(Image.open('test-european.jpg'), lang='fra'))
COPYRIGHT:
Pyocr is released under the GPL v3.
......
......@@ -9,9 +9,9 @@ from pyocr import pyocr
tools = pyocr.get_available_tools()[:]
if len(tools) == 0:
print "No OCR tool found"
print("No OCR tool found")
sys.exit(1)
print "Using '%s'" % (tools[0].get_name())
print("Using '%s'" % (tools[0].get_name()))
tools[0].image_to_string(Image.open('test.png'), lang='fra',
builder=TextBuilder())
......
......@@ -6,8 +6,8 @@ tesseract.py is a wrapper for google's Tesseract-OCR
USAGE:
> from PIL import Image
> from tesseract import image_to_string
> print image_to_string(Image.open('test.png'))
> print image_to_string(Image.open('test-european.jpg'), lang='fra')
> print(image_to_string(Image.open('test.png')))
> print(image_to_string(Image.open('test-european.jpg'), lang='fra'))
COPYRIGHT:
Pyocr is released under the GPL v3.
......
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