For a quick fix, save the standard
stdout in a different variable, then redirect to it after that close.# Simple image to string
saved_stdout = sys.stdout
sys.stdout = open('file.txt', 'w')
print (pytesseract.image_to_string(Image.open('Ke.png')))
sys.stdout.close()
sys.stdout = saved_stdout
No comments:
Post a Comment