home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import codecs
- from pygments.util import get_bool_opt
- from pygments.styles import get_style_by_name
- __all__ = [
- 'Formatter']
-
- def _lookup_style(style):
- if isinstance(style, basestring):
- return get_style_by_name(style)
- return style
-
-
- class Formatter(object):
- name = None
- aliases = []
- filenames = []
- unicodeoutput = True
-
- def __init__(self, **options):
- self.style = _lookup_style(options.get('style', 'default'))
- self.full = get_bool_opt(options, 'full', False)
- self.title = options.get('title', '')
- if not options.get('encoding', None):
- pass
- self.encoding = None
- if not options.get('outencoding', None):
- pass
- self.encoding = self.encoding
- self.options = options
-
-
- def get_style_defs(self, arg = ''):
- return ''
-
-
- def format(self, tokensource, outfile):
- if self.encoding:
- outfile = codecs.lookup(self.encoding)[3](outfile)
-
- return self.format_unencoded(tokensource, outfile)
-
-
-