title: How to use trained data with pytesseract?
body: <p>Using this tool <a href="http://trainyourtesseract.com/" rel="noreferrer">http://trainyourtesseract.com/</a> I would like to be able to use new fonts with pytesseract. the tool give me a file called *.traineddata</p>
  
  <p>Right now I'm using this simple script : </p>
  
  <pre><code>try:
      import Image
  except ImportError:
      from PIL import Image
  import pytesseract as tes
  
  results = tes.image_to_string(Image.open('./test.jpg'),boxes=True)
  file = open('parsing.text','a')
  file.write(results)
  print(results)
  </code></pre>
  
  <p>How to I use my traineddata file so I'm able to read new font with the python script ?</p>
  
  <p>thanks !</p>
  
  <p>edit#1 : so I understand that <code>*.traineddata</code> can be used with Tesseract as a command-line program. so my question still the same, how do I use traineddata with python ?</p>
  
  <p>edit#2 : the answer to my question is here <a href="https://stackoverflow.com/questions/42966322/how-to-access-the-command-line-for-tesseract-from-python">How to access the command line for Tesseract from Python?</a></p>