# HG changeset patch # User Jeff Hammel <k0scist@gmail.com> # Date 1394744043 25200 # Node ID 8147f25af5f748ea2d031c690ea86837bf4e2b9d # Parent 0e15d5aa78a20255316611c17c02abf24c98ff0c to textshaper diff -r 0e15d5aa78a2 -r 8147f25af5f7 python/tablify.py --- a/python/tablify.py Tue Mar 11 23:00:50 2014 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -def tablify(table_lines, header=True): - table = '<table>\n' - if header: - tag, invtag = '<th> ', ' </th>' - else: - tag, invtag = '<td> ', ' </td>' - if not hasattr(table_lines, '__iter__'): - table_lines = ( table_lines, ) - for i in table_lines: - table += '<tr>' - if not hasattr(i, '__iter__'): - i = (i,) - for j in i: - table += tag + str(j) + invtag - table += '</tr>\n' - tag = '<td> ' - invtag = ' </td>' - table += '</table>' - return table