The Austin Python Meetup Message Board › HTML Generation in Python
There seem to be a LOT of choices for HTML generation in python:
All I want is basic HTML generation -- NOT maintaining a website.
I have a python data structure (dictionary of dictionaries type thing), that I want to print to a single HTML page. I want a table of contents based on the top level dictionary's keys. The TOC should be hyperlinked to the body, with hyperlinks back to the TOC. That is about it.
It may be that this is so simple, I'm better off writing raw HTML from python.
|A former member||
To add to your list of choices, a very popular option that I have used in the past is Jinja2 (http://jinja.pocoo.or....
You can pass a dictionary to the template engine to create a table of contents pretty easily. Once you have your template loaded it could be as easy as: