Writing a Jinja-inspired template library in Python

from blog Notes on software development, | ↗ original
In this post we'll build a minimal text templating library in Python inspired by Jinja. It will be able to display variables and iterate over arrays. By the end of this article, with around 300 lines of code, we'll be able to create this program: from pytemplate import eval_template template = ''' {% for-in(post, posts) %} {{...