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
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