# See LICENSE for licensing information.
#
# Copyright (c) 2016-2024 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
class table_gen:
"""small library of functions to generate the html tables"""
def __init__(self, name):
self.name = name
self.rows = []
self.table_id = 'data'
def add_row(self, row):
"""add a row to table_gen object"""
self.rows.append(row)
def gen_table_head(self):
"""generate html table header"""
html = ''
html += ''
html += ''
for col in self.rows[0]:
html += ' '
html += ''
return html
def gen_table_body(self,comments):
"""generate html body (used after gen_table_head)"""
html = ''
html += '' + str(col) + ' '
html += '