MCPcopy Create free account
hub / github.com/Relento/lego_release / begin_table

Method begin_table

tu/loggers/html_table.py:109–127  ·  view source on GitHub ↗
(self, name, columns_or_spec_id)

Source from the content-addressed store, hash-verified

107 self.end_table()
108
109 def begin_table(self, name, columns_or_spec_id):
110 subtable = len(self._current_table_spec_stack) > 0
111 if subtable:
112 self._print('<tr><td style="padding-left:50px" colspan="{}">'.format(len(self._current_columns)))
113
114 if isinstance(columns_or_spec_id, int):
115 self._current_table_spec_stack.append(columns_or_spec_id)
116 else:
117 self._current_table_spec_stack.append(self.define_table(columns_or_spec_id))
118
119 if name is not None:
120 self._print('<h3>{}</h3>'.format(name))
121
122 self._print('<table>')
123 self._print('<tr>')
124 for c in self._current_columns:
125 # self._print(' <td><b>{}</b></td>'.format(c.name))
126 self._print(' <td><pre >{}</pre></td>'.format(c.name))
127 self._print('</tr>')
128
129 def end_table(self):
130 self._print('</table>')

Callers 1

tableMethod · 0.95

Calls 2

_printMethod · 0.95
define_tableMethod · 0.95

Tested by

no test coverage detected