python html generator

前端 未结 9 1609
轮回少年
轮回少年 2020-12-04 22:28

I am looking for an easily implemented html generator for python. I found this one

http://www.decalage.info/python/html

but there is no wa

9条回答
  •  醉话见心
    2020-12-04 22:45

    This is one ultra-simple HTML generator I have written. I use it build-time to generate html. If one is generating html pages run-time then there are better options available

    Here is the link

    http://pypi.python.org/pypi/sphc

    And a quick example

    >> import sphw
    >> tf = sphw.TagFactory()
    >>> div = tf.DIV("Some Text here.", Class='content', id='foo')
    >>> print(div)
    
    
    Some Text here.

提交回复
热议问题