<s> """<STR_LIT>""" <EOL> __version__ = '<STR_LIT>' <EOL> __docformat__ = '<STR_LIT>' <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> import sys <EOL> from pygments . util import StringIO , BytesIO <EOL> def lex ( code , lexer ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> return lexer . get_tokens ( code ) <EOL> except TypeError , err : <EOL> if isinstance ( err . args [ <NUM_LIT:0> ] , str ) and '<STR_LIT>' in err . args [ <NUM_LIT:0> ] : <EOL> raise TypeError ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> raise <EOL> def format ( tokens , formatter , outfile = None ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> if not outfile : <EOL> realoutfile = formatter . encoding and BytesIO ( ) or StringIO ( ) <EOL> formatter . format ( tokens , realoutfile ) <EOL> return realoutfile . getvalue ( ) <EOL> else : <EOL> formatter . format ( tokens , outfile ) <EOL> except TypeError , err : <EOL> if isinstance ( err . args [ <NUM_LIT:0> ] , str ) and '<STR_LIT>' in err . args [ <NUM_LIT:0> ] : <EOL> raise TypeError ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> raise <EOL> def highlight ( code , lexer , formatter , outfile = None ) : <EOL> """<STR_LIT>""" <EOL> return format ( lex ( code , lexer ) , formatter , outfile ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> from pygments . cmdline import main <EOL> sys . exit ( main ( sys . argv ) ) </s>
