Exemplo n.º 1
0
 def format(self, tokensource, outfile):
     # 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() and \
        sys.version_info < (3,):
         self.encoding = outfile.encoding
     return Formatter.format(self, tokensource, outfile)
Exemplo n.º 2
0
 def format(self, tokensource, outfile):
     return Formatter.format(self, tokensource, outfile)