Logo Search packages:      
Sourcecode: viewvc version File versions  Download package

py2html::PrettyPrint Class Reference

List of all members.


Detailed Description

generic Pretty Printer class

    * supports tagging Python scripts in the following ways: 

      # format/mode |  color  mono
      # --------------------------
      # rawhtml     |    x     x   (HTML without headers, etc.)
      # html        |    x     x   (a HTML page with HEAD&BODY:)
      # ansi        |    x     x   (with Ansi-escape sequences)

    * interfaces:

       file_filter -- takes two files: input & output (may be stdin/stdout)
       filter -- takes a string and returns the highlighted version

    * to create an instance use:

      c = PrettyPrint(tagfct,format,mode)

      where format and mode must be strings according to the
      above table if you plan to use PyFontify.fontify as
      tagfct

    * the tagfct has to take one argument, text, and return a taglist
      (format: [(id,left,right,sublist),...], where id is the
      "name" given to the slice left:right in text and sublist is a
      taglist for tags inside the slice or None)

Definition at line 109 of file py2html.py.


Public Member Functions

def __init__
def escape_html
def file_filter
def filter_ansi
def filter_html
def filter_rawhtml
def fontify
def set_mode_ansi_color
def set_mode_ansi_mono
def set_mode_html_color
def set_mode_html_mono

Public Attributes

 css
 filter
 formats
 set_mode
 tag
 title

Static Public Attributes

string bgcolor = '#FFFFFF'
string css = ''
string footer = ''
dictionary formats = {}
string header = ''
int replace_URLs = 0
 set_mode_rawhtml_color = set_mode_html_color
 set_mode_rawhtml_mono = set_mode_html_mono
string title = ''

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index