示例#1
0
def script(args):
    """Run the script"""
    stream = text_streams.first_argv('-c')
    if not stream:
        print >> sys.stderr, 'No file specified'
        return not os.EX_OK
    lines = map(tracebacks.parse_line, text_streams.full_lines(stream))
    show([_ for _ in lines if _], args)
    return os.EX_OK
示例#2
0
def main(args):
    """Run the script"""
    args = [_ for _ in args if _[:2] != "--"]
    stream = text_streams.first_argv("-c")
    if not stream:
        print >> sys.stderr, "No file specified"
        return not os.EX_OK
    lines = map(tracebacks.parse_line, text_streams.full_lines(stream))
    print as_vim_command(lines, "-s" in args)
    return os.EX_OK
示例#3
0
def main(_args):
    """Use command line args as files containing tracebacks"""
    streams = text_streams.argvs('-c')
    if not streams:
        print >> sys.stderr, 'No traceback file specified'
        return not os.EX_OK
    for stream in streams:
        for line in parse_traceback_lines(text_streams.full_lines(stream)):
            print 'b', ':'.join(line)
    return os.EX_OK