def log(self, tokens, stream=sys.stdout):
"""Log the input token stream with the standard Python logging
mecanism.
PARAMETERS
log_fn: the logging function to use
tokens: the input tokens stream
"""
assert self.formatter is not None, 'Internal error'
print >> stream, pygments.format(tokens, self.formatter)
stream.flush()
评论列表
文章目录