(self, list, format, cols=4)
return '<table width="100%%" summary="list"><tr>%s</tr></table>' % result
Format a list of items into a multi-column list.
Format a list of items into a multi-column list.
Format a list of items into a multi - column list .
def multicolumn(self, list, format, cols=4):
        """Format a list of items into a multi-column list."""
        result = ''
        rows = (len(list)+cols-1)//cols
        for col in range(cols):
            result = result + '<td width="%d%%" valign=top>' % (100//cols)
            for i in range(rows*col, rows*col+rows):
                if i < len(list):
                    result = result + format(list[i]) + '<br>\n'
            result = result + '</td>'
        return '<table width="100%%" summary="list"><tr>%s</tr></table>' % result
def multicolumn ( self , list , format , cols = 4 ) : result = '' rows = ( len ( list ) + cols - 1 ) // cols for col in range ( cols ) : result = result + '<td width="%d%%" valign=top>' % ( 100 // cols ) for i in range ( rows * col , rows * col + rows ) : if i < len ( list ) : result = result + format ( list [ i ] ) + '<br>\n' result = result + '</td>' return '<table width="100%%" summary="list"><tr>%s</tr></table>' % result