def new_table(self, rowiter, coliter, headings=(), renderer=_NULLRenderer,
                               **kwargs):
        tbl = self.add_table(**kwargs)
        tbl_id = kwargs.get("id")
        NM = self.get_nodemaker()
        cycler = itertools.cycle(["row1", "row2"]) # For alternating row styles.
        # headings
        if headings:
            tbl.new_headings(*headings)
        # table body
        if tbl_id: # if table has id, then cells get an id.
            for y, obj in enumerate(rowiter):
                row = tbl.new_row()
                setattr(row, "class_", cycler.next())
                col = row.add_column(id="%s_%s_%s" % (tbl_id, y, 0))
                col.append(check_object(renderer(NM, obj)))
                for x, callback in enumerate(coliter):
                    col = row.add_column(id="%s_%s_%s" % (tbl_id, y, x+1))
                    col.append(check_object(callback(NM, obj)))
        else:
            for obj in rowiter:
                row = tbl.new_row()
                setattr(row, "class_", cycler.next())
                col = row.add_column()
                col.append(check_object(renderer(NM, obj)))
                for callback in coliter:
                    col = row.add_column()
                    col.append(check_object(callback(NM, obj)))
        return tbl
Construct a new table. Row iterator adds rows with first column
dataset/ETHPy150Open kdart/pycopia/WWW/pycopia/WWW/XHTML.py/ContainerMixin.new_table