Format a list of items into a multi-column list.
(self, list, format)
| 659 | ' ', ' ', '\n', '<br>\n') |
| 660 | |
| 661 | def multicolumn(self, list, format): |
| 662 | """Format a list of items into a multi-column list.""" |
| 663 | result = '' |
| 664 | rows = (len(list) + 3) // 4 |
| 665 | for col in range(4): |
| 666 | result = result + '<td class="multicolumn">' |
| 667 | for i in range(rows*col, rows*col+rows): |
| 668 | if i < len(list): |
| 669 | result = result + format(list[i]) + '<br>\n' |
| 670 | result = result + '</td>' |
| 671 | return '<table><tr>%s</tr></table>' % result |
| 672 | |
| 673 | def grey(self, text): return '<span class="grey">%s</span>' % text |
| 674 |
no test coverage detected