def call_tesseract(input_filename, output_filename, bool_digits=False):
 if bool_digits:
  args = (((((tesseract_exe_name + ' ') + input_filename) + ' ') + output_filename) + ' -l test_digits -psm 7 nobatch')
 else:
  args = (((((tesseract_exe_name + ' ') + input_filename) + ' ') + output_filename) + ' -l eng -psm 7 nobatch eng_characters')
 proc = subprocess.Popen(args, shell=True)
 retcode = proc.wait()
 if (retcode != 0):
  errors.check_for_errors()

def call_tesseract ( input_filename , output_filename , bool_digits = False ) : if bool_digits : args = ( ( ( ( ( tesseract_exe_name + ' ' ) + input_filename ) + ' ' ) + output_filename ) + ' -l test_digits -psm 7 nobatch' ) else : args = ( ( ( ( ( tesseract_exe_name + ' ' ) + input_filename ) + ' ' ) + output_filename ) + ' -l eng -psm 7 nobatch eng_characters' ) proc = subprocess . Popen ( args , shell = True ) retcode = proc . wait ( ) if ( retcode != 0 ) : errors . check_for_errors ( )
calls external tesseract .