def run_tesseract(input_filename, output_filename_base, lang=None, boxes=False):

    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())
runs the command:
dataset/ETHPy150Open tanghaibao/jcvi/apps/tesseract.py/run_tesseract