| |
- __builtin__.object
-
- List
- Table
- TableCell
- TableRow
class List(__builtin__.object) |
|
a List object is used to create an ordered or unordered list in HTML.
(UL/OL tag)
Attributes:
- lines: list, tuple or any iterable, containing one string for each line
- ordered: bool, choice between an ordered (OL) or unordered list (UL)
- attribs: dict, additional attributes for the OL/UL tag
Reference: http://www.w3.org/TR/html4/struct/lists.html |
|
Methods defined here:
- __init__(self, lines=None, ordered=False, start=None, attribs=None)
- List constructor
- __str__(self)
- return the HTML code for the list as a string
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Table(__builtin__.object) |
|
a Table object is used to create a HTML table. (TABLE tag)
Attributes:
- rows: list, tuple or any iterable, containing one iterable or TableRow
object for each row
- header_row: list, tuple or any iterable, containing the header row (optional)
- border: str or int, border width
- style: str, table style in CSS syntax (thin black borders by default)
- width: str, width of the table on the page
- attribs: dict, additional attributes for the TABLE tag
- col_width: list or tuple defining width for each column
- col_align: list or tuple defining horizontal alignment for each column
- col_char: list or tuple defining alignment character for each column
- col_charoff: list or tuple defining charoff attribute for each column
- col_valign: list or tuple defining vertical alignment for each column
- col_styles: list or tuple of HTML styles for each column
Reference: http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1 |
|
Methods defined here:
- __init__(self, rows=None, border='1', style=None, width=None, cellspacing=None, cellpadding=4, attribs=None, header_row=None, col_width=None, col_align=None, col_valign=None, col_char=None, col_charoff=None, col_styles=None)
- TableCell constructor
- __str__(self)
- return the HTML code for the table as a string
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class TableCell(__builtin__.object) |
|
a TableCell object is used to create a cell in a HTML table. (TD or TH)
Attributes:
- text: text in the cell (may contain HTML tags). May be any object which
can be converted to a string using str().
- header: bool, false for a normal data cell (TD), true for a header cell (TH)
- bgcolor: str, background color
- width: str, width
- align: str, horizontal alignement (left, center, right, justify or char)
- char: str, alignment character, decimal point if not specified
- charoff: str, see HTML specs
- valign: str, vertical alignment (top|middle|bottom|baseline)
- style: str, CSS style
- attribs: dict, additional attributes for the TD/TH tag
Reference: http://www.w3.org/TR/html4/struct/tables.html#h-11.2.6 |
|
Methods defined here:
- __init__(self, text='', bgcolor=None, header=False, width=None, align=None, char=None, charoff=None, valign=None, style=None, attribs=None)
- TableCell constructor
- __str__(self)
- return the HTML code for the table cell as a string
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class TableRow(__builtin__.object) |
|
a TableRow object is used to create a row in a HTML table. (TR tag)
Attributes:
- cells: list, tuple or any iterable, containing one string or TableCell
object for each cell
- header: bool, true for a header row (TH), false for a normal data row (TD)
- bgcolor: str, background color
- col_align, col_valign, col_char, col_charoff, col_styles: see Table class
- attribs: dict, additional attributes for the TR tag
Reference: http://www.w3.org/TR/html4/struct/tables.html#h-11.2.5 |
|
Methods defined here:
- __init__(self, cells=None, bgcolor=None, header=False, attribs=None, col_align=None, col_valign=None, col_char=None, col_charoff=None, col_styles=None)
- TableCell constructor
- __str__(self)
- return the HTML code for the table row as a string
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |