'Process data block for OUTPUT token.'

def process_output(self, data, output_prompt, input_lines, output, is_doctest, image_file):

    if is_doctest:
        submitted = data.strip()
        found = output
        if (found is not None):
            found = found.strip()
            ind = found.find(output_prompt)
            if (ind < 0):
                e = ('output    prompt="%s"    does    not    match    out    line=%s' % (output_prompt, found))
                raise RuntimeError(e)
            found = found[len(output_prompt):].strip()
            if (found != submitted):
                e = ('doctest    failure    for    input_lines="%s"    with    found_output="%s"    and    submitted    output="%s"' % (input_lines, found, submitted))
                raise RuntimeError(e)
