diff options
author | René Stadler <mail@renestadler.de> | 2012-09-21 19:13:07 +0200 |
---|---|---|
committer | René Stadler <mail@renestadler.de> | 2012-09-21 19:13:07 +0200 |
commit | c1cc4678034bdeb76281023025a5a4734a960330 (patch) | |
tree | 66903eb89191e1909ab71b1c1ced69224d5aca24 | |
parent | 247822f6a7d5ef94067cc217c36ae41ebc9859ef (diff) |
Remove color stripping script
-rwxr-xr-x | gst-debug-strip-color.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gst-debug-strip-color.py b/gst-debug-strip-color.py deleted file mode 100755 index ccc184f..0000000 --- a/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 () |