From 5743483778ffe5b389d10b1651ae1e8951b397ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 25 Mar 2009 10:22:05 +0000 Subject: [PATCH] python: Use Ansi escape codes regardless of output is a tty or not. --- src/gallium/state_trackers/python/retrace/format.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/python/retrace/format.py b/src/gallium/state_trackers/python/retrace/format.py index 0bf6baf0b94..d56d72f606f 100755 --- a/src/gallium/state_trackers/python/retrace/format.py +++ b/src/gallium/state_trackers/python/retrace/format.py @@ -27,6 +27,9 @@ ########################################################################## +import sys + + class Formatter: '''Plain formatter''' @@ -93,7 +96,7 @@ class AnsiFormatter(Formatter): def DefaultFormatter(stream): - if stream.isatty(): + if sys.platform in ('linux2', 'cygwin'): return AnsiFormatter(stream) else: return Formatter(stream) -- 2.30.2