1

I'm new on Python. I'm working in an OCR project. I'm using Python 2.7.12 on Windows 7. I have installed tesseract in the path "C:\Program Files (x86)\Tesseract-OCR"

I found the pytesser library v0.0.2 here: https://searchcode.com/codesearch/view/11386640/#

When I run the code:

from pytesser import *
image=Image.open('dis.tiff')
text=image_to_string(image)
print (text)

It calls to tesseract and the tesseract.exe window appears (see the image: https://www.dropbox.com/s/p0i6sjj61yhfnp9/question.png?dl=0). I want to hide it but I don't know how to do it. I think that I have to change something in the library files. Somebody can help me please?

Eryk Sun
  • 33,190
  • 5
  • 92
  • 111
Alex Ortega
  • 45
  • 11
  • You're currently working in IDLE, in which case I don't think it really matters if a console window pops up. If you're planning to develop a GUI app with this library, then you'll need to modify the `subprocess.Popen` call in pytesser.py to [hide the console](http://stackoverflow.com/a/7006424/205580). I'd first try the `CREATE_NO_WINDOW` process creation flag. – Eryk Sun Aug 05 '16 at 07:18
  • @eryksun Thanks, it works fine! – Alex Ortega Aug 09 '16 at 00:59

0 Answers0