Previous Next blank.gif Home Page

Class Paragraph - Define a Paragraph.


SYNOPSIS

import HTMLgen
class Paragraph
  def __init__(self, text='', **kw)
  def __repr__(self)
  def append(self, text)
  def markup(self, rex= None, classobj=None, kw=None)

alias Para = Paragraph

DESCRIPTION

Takes a single string/object argument and the optional keyword argument align which may be one of (left, right, center). Not to be confused with class P. That is just for inserting a para break.

def append(self, text)

Adds text (or any object) onto the end of object.

def markup(self, rex= None, classobj=None, kw=None)

Markup the text with a given regex with a given tag class.

Arguments

rex
a regular expression object or string which will be used to match all text patterns in the Paragraph body.
classobj
a class object to which the found text will be sent for wrapping.
kw
Optional dictionary of keyword parameter mappings sent along to the class to tailor the instance.

**[EXPERIMENTAL]**

Example:

    Paragraph('Some text to center', align='center')

SEE ALSO

HTMLgen


Previous Next blank.gif Home Page
Buzz.gif

Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedric@phoenix.net
Generated: Mon Dec 2 1996