Back to index

plone3  3.1.7
Classes | Functions | Variables
PortalTransforms.transforms.python Namespace Reference

Classes

class  Parser
class  PythonTransform

Functions

def register

Variables

string __revision__ = '$Id: python.py 3661 2005-02-23 17:05:31Z tiran $'
int _KEYWORD = 1
 Python Source Parser #####################################################.
int _TEXT = 2

Detailed Description

Original code from active state recipe
        'Colorize Python source using the built-in tokenizer'

----------------------------------------------------------------------------
     MoinMoin - Python Source Parser

 This code is part of MoinMoin (http://moin.sourceforge.net/) and converts
 Python source code to HTML markup, rendering comments, keywords, operators,
 numeric and string literals in different colors.

 It shows how to use the built-in keyword, token and tokenize modules
 to scan Python source code and re-emit it with no changes to its
 original formatting (which is the hard part).

Function Documentation

Definition at line 147 of file python.py.

00147 
00148 def register():
00149     return PythonTransform()

Variable Documentation

string PortalTransforms.transforms.python.__revision__ = '$Id: python.py 3661 2005-02-23 17:05:31Z tiran $'

Definition at line 16 of file python.py.

Python Source Parser #####################################################.

Definition at line 27 of file python.py.

Definition at line 28 of file python.py.