#NEWLINE# def new_table_from_GenericTable( self , table , renderer = _NULLRenderer , **kwargs ) : #NEWLINE# #INDENT# 'Construct an XHTML table from a pycopia.table.GenericTable object.\n        ' #NEWLINE# tbl = self . add_table ( ** kwargs ) #NEWLINE# NM = self . get_nodemaker ( ) #NEWLINE# cycler = itertools . cycle ( [ 'row1' , 'row2' ] ) #NEWLINE# if table . headings : #NEWLINE# #INDENT# tbl . new_headings ( * table . headings ) #NEWLINE# #UNINDENT# if table . title : #NEWLINE# #INDENT# tbl . caption ( self . title ) #NEWLINE# #UNINDENT# for table_row in table : #NEWLINE# #INDENT# row = tbl . new_row ( ) #NEWLINE# setattr ( row , 'class_' , cycler . next ( ) ) #NEWLINE# for cell in table_row : #NEWLINE# #INDENT# col = row . add_column ( ) #NEWLINE# col . append ( check_object ( renderer ( NM , cell ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return tbl