Pretty Print Python Data Structures to HTML

Mensanator mensanator at
Sat Oct 17 10:12:10 CEST 2009

On Oct 17, 2:25�am, Sam <samsli... at> wrote:
> I'm looking for something like the pprint module but that can take a
> Python data structure and turn it into HTML (or better xHTML).
> It would read through the data structure but instead of formatting it
> using spaces it would format it using either dd/dt or ordered/
> unordered lists or even as a html table.
> Have I explained this well enough that you can understand what I
> mean? �

Not sure. Have you tried using <tt> tags with regular Python
string formatting?

> Is such a library available anywhere?
> Thanks

More information about the Python-list mailing list