Don't color output if stdout is not a tty.

This commit is contained in:
Georg Brandl committed 2007-08-02 08:24:23 +00:00
1 parent ca78ec11e9
commit 8f842f5ace
1 file changed
+1 -1
+1 -1
View File
@@ -99,7 +99,7 @@ def main(argv):
elif opt == '-N':
nocolor()
if sys.platform == 'win32':
if not sys.stdout.isatty() or sys.platform == 'win32':
# Windows' cmd box doesn't understand ANSI sequences
nocolor()