DEV Community

Discussion on: print or extend Python output to an HTML file

Collapse
 
deciduously profile image
Ben Lovy

I also don't know the solution, but it sounds to me like you're already on the right track with Jinja2. It's a format-agnostic template system, I think you should be able to use it to do what you need here, but take this with all the grains of salt... it's what I'd try first, for what that's worth.

Collapse
 
vickilanger profile image
Vicki Langer

Yeah, I thought Jinja2 would do it, but so far it seems to only work with HTML files. I’ll keep looking though.