<s> """<STR_LIT>""" <EOL> import codecs <EOL> from pygments . util import get_bool_opt <EOL> from pygments . styles import get_style_by_name <EOL> __all__ = [ '<STR_LIT>' ] <EOL> def _lookup_style ( style ) : <EOL> if isinstance ( style , basestring ) : <EOL> return get_style_by_name ( style ) <EOL> return style <EOL> class Formatter ( object ) : <EOL> """<STR_LIT>""" <EOL> name = None <EOL> aliases = [ ] <EOL> filenames = [ ] <EOL> unicodeoutput = True <EOL> def __init__ ( self , ** options ) : <EOL> self . style = _lookup_style ( options . get ( '<STR_LIT>' , '<STR_LIT:default>' ) ) <EOL> self . full = get_bool_opt ( options , '<STR_LIT>' , False ) <EOL> self . title = options . get ( '<STR_LIT:title>' , '<STR_LIT>' ) <EOL> self . encoding = options . get ( '<STR_LIT>' , None ) or None <EOL> self . encoding = options . get ( '<STR_LIT>' , None ) or self . encoding <EOL> self . options = options <EOL> def get_style_defs ( self , arg = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> return '<STR_LIT>' <EOL> def format ( self , tokensource , outfile ) : <EOL> """<STR_LIT>""" <EOL> if self . encoding : <EOL> outfile = codecs . lookup ( self . encoding ) [ <NUM_LIT:3> ] ( outfile ) <EOL> return self . format_unencoded ( tokensource , outfile ) </s>
