Skip to content

Instantly share code, notes, and snippets.

@tkh44
Created November 28, 2011 21:00
Show Gist options
  • Save tkh44/1402031 to your computer and use it in GitHub Desktop.
Save tkh44/1402031 to your computer and use it in GitHub Desktop.
table parse
def parse(kwargs):
name = kwargs.get('name')
html = '<tr>\n'
html += '\t<th>{{ name }}</th>\n'
if kwargs.get('values'):
values = kwargs.get('values')
split_values = values.split(';')
for i in range(0, len(split_values)):
html += '\t\t\t<td>%s</td>\n' % split_values[i]
html += '</tr>\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment