(self, title, fgcol, bgcol, contents, width=6,
                prelude='', marginalia=None, gap='&nbsp;')
return result + '\n<td width="100%%">%s</td></tr></table>' % contents
Format a section with a heading.
Format a section with a heading.
Format a section with a heading .
def section(self, title, fgcol, bgcol, contents, width=6,
                prelude='', marginalia=None, gap='&nbsp;'):
        """Format a section with a heading."""
        if marginalia is None:
            marginalia = '<tt>' + '&nbsp;' * width + '</tt>'
        result = '''<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="%s">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">%s</font></td></tr>
    ''' % (bgcol, fgcol, title)
        if prelude:
            result = result + '''
<tr bgcolor="%s"><td rowspan=2>%s</td>
<td colspan=2>%s</td></tr>
<tr><td>%s</td>''' % (bgcol, marginalia, prelude, gap)
        else:
            result = result + '''
<tr><td bgcolor="%s">%s</td><td>%s</td>''' % (bgcol, marginalia, gap)

        return result + '\n<td width="100%%">%s</td></tr></table>' % contents
def section ( self , title , fgcol , bgcol , contents , width = 6 , prelude = '' , marginalia = None , gap = '&nbsp;' ) : if marginalia is None : marginalia = '<tt>' + '&nbsp;' * width + '</tt>' result = '''<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="%s">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">%s</font></td></tr>
    ''' % ( bgcol , fgcol , title ) if prelude : result = result + '''
<tr bgcolor="%s"><td rowspan=2>%s</td>
<td colspan=2>%s</td></tr>
<tr><td>%s</td>''' % ( bgcol , marginalia , prelude , gap ) else : result = result + '''
<tr><td bgcolor="%s">%s</td><td>%s</td>''' % ( bgcol , marginalia , gap ) return result + '\n<td width="100%%">%s</td></tr></table>' % contents