The List class and it's children have been structured to
allow full nesting of either regular Python data types, (e.g.,
lists of lists of strings) or HTMLgen objects. For example, an
OrderedList class can contain an instance of the List class,
ImageBulletList class and DefinitionList class. Added in version
2.0.6 is the capability to render the list into multiple
columns. Just set the columns
attribute to a number
greater than one and it will use that many columns. Also added
is the ability to assign a background color through the use of
the bgcolor
attribute.
The Netscape Navigator extension type
tag is
supported as an attribute of the List and OrderedList classes
and can be set as keyword parameters (although they have
different meanings). In List instances you can set the
type='disk' | 'circle' | 'square'
to hardwire the
style of bullet used. In OrderedList instances you can set
type='A' | 'a' | 'I' | 'i'
to alter the numbering from
Arabic to respectively: capital letters, small letters, Roman
numerals, small Roman numerals.
Normal list operations apply to all the classes in this family as the base class inherits from the UserList class provided in the core distribution.
The rendered HTML output should also exhibit indentation proportional to the level of list nesting.
Below is some example output. See the HTMLtest.py script for the source code which generated it.
|
|
"Don't play dumb. You're not as good at it as I am.": Colonel Flagg - M*A*S*H
"Don't play dumb. You're not as good at it as I am.": Colonel Flagg - M*A*S*H
Copyright © 1996-7 Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Tue Apr 20, 1999