6.4.5.18. Tables

Start python section to interscript/weavers/html.py[21 /22 ] Next Prev Last
   545: #line 602 "html_weaver.ipk"
   546:   def begin_table(self, *headings, **kwds):
   547:     border=kwds.get('border',2)
   548:     tbclass = kwds.get('CLASS','DEFAULT_TABLE_CLASS')
   549:     self._writeline('<TABLE CLASS="'+tbclass+'" COLS="'+str(len(headings))+'" BORDER="'+str(border)+'"><TR>')
   550:     for h in headings:
   551:       self._write('<TH>')
   552:       self.write(h)
   553:       self._write('</TH>')
   554:     self._writeline('</TR>')
   555: 
   556:   def table_row(self,data):
   557:     self._write('<TR>')
   558:     for d in data:
   559:       self._write('<TD VALIGN="TOP">')
   560:       lines = string.split(d,'\n')
   561:       for line in lines:
   562:         self.write(line)
   563:         self._write('<BR>')
   564:       self._write('</TD>')
   565:     self._writeline('</TR>')
   566: 
   567:   def end_table(self):
   568:     self._writeline('</TABLE>')
   569: 
End python section to interscript/weavers/html.py[21]