--- a/ThirdParty/Pygments/pygments/formatters/terminal.py Mon Mar 12 19:01:48 2012 +0100 +++ b/ThirdParty/Pygments/pygments/formatters/terminal.py Mon Mar 12 19:03:42 2012 +0100 @@ -5,10 +5,12 @@ Formatter for terminal output with ANSI sequences. - :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ +import sys + from pygments.formatter import Formatter from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Token, Whitespace @@ -86,7 +88,8 @@ # hack: if the output is a terminal and has an encoding set, # use that to avoid unicode encode problems if not self.encoding and hasattr(outfile, "encoding") and \ - hasattr(outfile, "isatty") and outfile.isatty(): + hasattr(outfile, "isatty") and outfile.isatty() and \ + sys.version_info < (3,): self.encoding = outfile.encoding return Formatter.format(self, tokensource, outfile)