Use Python to automate Tesseract