Kid (templating language)
Kid is a simple template engine for XML-based vocabularies written in Python. Kid claims to have many of the best features of XSLT, TAL, and PHP, but "with much of the limitations and complexity stamped out".
While kid was heavily hyped by the TurboGears framework it looks like it's more and more replaced by Genshi due to better debugging and basic XPath support as well as better performance.
Example
Python part: <source lang="python"> from kid import Template template = Template(file='mytemplate.kid',
title='bar', mylist=['1', '2', '3', '4', '5', '6']
) print template.serialize() </source>
Template part: <source lang="xml"> <html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://purl.org/kid/ns#"> <head> <title py:content="title">title goes here</title> </head> <body>
- item goes here
</body>
</html> </source>
External links
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...