code: def run_tesseract(input_filename, output_filename_base, lang=None, boxes=False):
      '''
      runs the command:
          `tesseract_cmd` `input_filename` `output_filename_base`
  
      returns the exit status of tesseract, as well as tesseract's stderr output
  
      '''
  
      command = [tesseract_cmd, input_filename, output_filename_base]
  
      if lang is not None:
          command += ['-l', lang]
  
      if boxes:
          command += ['batch.nochop', 'makebox']
  
      proc = subprocess.Popen(command,
                              stderr=subprocess.PIPE)
      return (proc.wait(), proc.stderr.read()f run_tesseract(input_filename, output_filename_base, lang=None, boxes=False):
      '''
      runs the command:
          `tesseract_cmd` `input_filename` `output_filename_base`
  
      returns the exit status of tesseract, as well as tesseract's stderr output
  
      '''
  
      command = [tesseract_cmd, input_filename, output_filename_base]
  
      if lang is not None:
          command += ['-l', lang]
  
      if boxes:
          command += ['batch.nochop', 'makebox']
  
      proc = subprocess.Popen(command,
                              stderr=subprocess.PIPE)
      return (proc.wait(), proc.stderr.read())
docs: runs the command:
          `tesseract_cmd` `input_filename` `output_filename_base`
  
      returns the exit status of tesseract, as well as tesseract's stderr output