osl_dynamics.utils.tables.HTMLTable#
- class osl_dynamics.utils.tables.HTMLTable(headers)#
Bases:
TableClass for creating HTML tables.
- Attributes:
- headerslist of str
The table headers.
- rowslist of list of str
The table rows.
- outer = Multiline-String#
Show Value
"""<table> {headers} {content} </table>"""
- tr = '<tr>{}</tr>'#
- th = '<th>{}</th>'#
- td = '<td style="white-space:pre-wrap; word-wrap:break-word">{}</td>'#
- append_last(item)#
Append an item to the last cell in the last row.
- Parameters:
- itemstr
The string to append to the cell.
- html_row(items)#
Format a list of strings as an HTML table row.
- Parameters:
- itemslist of str
A list of
strto be added to the HTML table.
- Returns:
- htmlstr
The HTML table row.
- html_headers()#
Generate HTML table headers from self.headers
- Returns:
- headersstr
HTML table headers
- output()#
Create the full HTML for the table.
- Returns:
- htmlstr
The HTML for the table.
- headers#
- rows = []#