From 73e549d7e732567217f610ce3db1a543541ea1ad Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Mon, 25 Mar 2013 00:08:53 +0100 Subject: [PATCH] Call the pygment highlighter on the whole input --- colout.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/colout.py b/colout.py index 24cac49..e808746 100755 --- a/colout.py +++ b/colout.py @@ -422,15 +422,7 @@ if __name__ == "__main__": else: formatter = TerminalFormatter() - while True: - try: - item = sys.stdin.readline() - except KeyboardInterrupt: - break - if not item: - break - colored = highlight(item, lexer, formatter) - write(colored) + write(highlight(sys.stdin.read(), lexer, formatter)) # if color else: