def print_error(input, err, scanner):
    # NOTE: this function assumes 80 columns :-(
    # Figure out the line number
    line_number = scanner.get_line_number()
    column_number = scanner.get_column_number()
    print >>sys.stderr, '%d:%d: %s' % (line_number, column_number, err.msg)

    context = err.context
    if not context:
        print_line_with_pointer(input, err.charpos)

    while context:
        # TODO: add line number
        print >>sys.stderr, 'while parsing %s%s:' % (context.rule, tuple(context.args))
        print_line_with_pointer(input, context.scanner.get_prev_char_pos(context.tokenpos))
        context = context.parent
Setup a log file and the logger.  If the given file name is not
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/xish/xpathparser.py/print_error--crossover with--dataset/ETHPy150Open enthought/mayavi/mayavi/plugins/app.py/setup_logger