From fb032c177fcb4932c015bda9e17bbf9bf1339f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Fri, 21 Sep 2012 19:13:07 +0200 Subject: [PATCH] Remove color stripping script --- debug-viewer/gst-debug-strip-color.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 debug-viewer/gst-debug-strip-color.py diff --git a/debug-viewer/gst-debug-strip-color.py b/debug-viewer/gst-debug-strip-color.py deleted file mode 100755 index ccc184fbd1..0000000000 --- a/debug-viewer/gst-debug-strip-color.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -import sys -import re - -def strip_color (input, output): - - _escape = re.compile ("\x1b\\[[0-9;]*m") - # TODO: This can be optimized further! - - for line in input: - while "\x1b" in line: - line = _escape.sub ("", line) - output.write (line) - -def main (): - - if len (sys.argv) == 1 or sys.argv[1] == "-": - strip_color (sys.stdin, sys.stdout) - else: - strip_color (file (sys.argv[1], "rb"), sys.stdout) - -if __name__ == "__main__": - main ()