Creating HTML in python

后端 未结 5 1078
情歌与酒
情歌与酒 2020-11-30 02:45

I am looking for a way to create html files dynamically in python. I am writing a gallery script, which iterates over directories, collecting file meta data. I intended to

5条回答
  •  -上瘾入骨i
    2020-11-30 03:48

    Templating, as suggested in other answers, is probably the best answer (I wrote an early, quirky templating module called yaptu, but modern mature ones as suggested in other answers will probably make you happier;-).

    However, though it's been a long time since I last used it, I fondly recall the Quixote approach, which is roughly a "reverse templating" (embedding HTML generation within Python, rather than viceversa as normal templating does). Maybe you should take a look and see if you like it better;-).

提交回复
热议问题