pytesseract.image_to_string Enregistrer le fichier texte

try:
    from PIL import Image
except ImportError:
    import Image
import pytesseract
# Simple image to string
text=print(pytesseract.image_to_string(Image.open('test.jpg'),lang="eng"))
with open('out.txt', 'w') as f:
    print(text, file=f)
Homeless Heron