import HTMLgen
class DefinitionList(List)
string __module__ = 'HTMLgen'
tuple attrs = ('class', 'id', 'style')
tuple flags = ('compact',)
def render_list_item(self, item)
string tagname = 'DL'
# Methods inherited by DefinitionList from List
def __getslice__(self, i, j)
def __init__(self, list = None, **kw)
def __str__(self)
def append(self, *items)
def column_slices(self, columns=1)
def end_element(self)
def multi_column_table(self)
def start_element(self)
def sub_list(self, list)
# Methods inherited by DefinitionList from UserList
def __add__(self, list)
def __cmp__(self, list)
def __delitem__(self, i)
def __delslice__(self, i, j)
def __getitem__(self, i)
def __len__(self)
def __mul__(self, n)
def __mul__(self, n)
def __radd__(self, list)
def __repr__(self)
def __setitem__(self, i, item)
def __setslice__(self, i, j, list)
def count(self, item)
def index(self, item)
def insert(self, i, item)
def remove(self, item)
def reverse(self)
def sort(self, *args)
alias DL = DefinitionList
Arg is a list of tuple pairs: "(string/object,string/object),(,)..." 1st item in each pair is the word to be defined. It will be rendered in bold. 2nd is the string which will be indented to it's next-line-right. If the compact flag is set to non-empty, the definition side will be placed on the same line. Example
DefinitionList([( 4 , 'Number after 3') , ( 1 , 'Unity')] ) will emit: 4 Number after 3 1 Unity
Append entries to the end of the list
Calculate a list of index pairs bounding column slices.
Closes the HTML element
Return a table containing the list sliced into columns.
Overload method to perform DT/DD markup.
Generic creator for the HTML element opening tag.
Reads tagname, attrs and flags to return appropriate tag.
Recursive method for generating a subordinate list
Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Thu May 28 1998