Package wtf :: Package app :: Package services :: Module _crash_tb :: Class PythonParser
[hide private]
[frames] | no frames]

Class PythonParser

source code

object --+
         |
        PythonParser

Simple python sourcecode highlighter. Usage:

p = PythonParser(source)
p.parse()
for line in p.get_html_output():
    print line
Instance Methods [hide private]
 
__init__(self, raw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
parse(self) source code
 
get_html_output(self)
Return line generator.
source code
 
__call__(self, toktype, toktext, (srow, scol), (erow, ecol), line) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _KEYWORD = 257
  _TEXT = 258
  _classes = {1: 'id', 2: 'num', 3: 'str', 51: 'op', 52: 'error'...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, raw)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

Class Variable Details [hide private]

_classes

Value:
{1: 'id',
 2: 'num',
 3: 'str',
 51: 'op',
 52: 'error',
 53: 'cmt',
 257: 'kw',
 258: 'txt'}