I am making a table with web2py HTML helpers. My code is based on the example from the web2py book:
>>> table = [['a', 'b'], ['c', 'd']]
>>> print TABLE(TR(*table[0]), TR(*table[1]))
<table><tr><td>a</td><td>b</td></tr><tr><td>c</td><td>d</td></tr></table>
I have quite a large table, but this approach places all output on one big line. For readability of the HTML, I would appreciate a way to add newlines after each </tr>. I like the HTML helper functions so prefer not to go for the plain {{for ...}} ... {{pass}} approach in the view.