I'm looking for a mature, easy-to-use, powerful, stand-alone, "beautiful" template system/language for Python. I'm primarily interested in generating (static) HTML from HTML sources (so Markdown/RST/Textile aren't relevant).
There seems to be an array of choices (the Python wiki has a very long list), which makes selecting quite daunting. The following are the languages I've heard of or used, ranked by my personal level of familiarity.
Feel free to make this into a community wiki, if there's interest.
Django
Pros:
- Familiar and easy syntax if you've used Django.
- Django's awesome documentation.
- Much separation from logic.
- Actively supported and maintained.
Cons:
- Not really made to be used in stand-alone mode. I don't even know if loading template tag libraries work if you don't have any
INSTALLED_APPS
. - Tied to the schedule of the entire Django project makes stand-alone usage fuzzy.
- Perhaps overly non-Pythonic syntax.
Jinja2
Pros:
- Syntax is essentially Django++
- Configurable syntax
- Well-maintained
- Good documentation
Genshi
- XHTML:ish syntax (good or bad?)
- Therefore locked into generating XML based output?
- Possible to use Python directly in templates (
<?python ... ?>
)
Mako
Pros:
- Backed by Pylons, deployed on sites like reddit.com
Cons:
- The syntax (from a quick glance) strikes me as a bit uneven.
<%
,%
, and$
?
Some things that I think are worth considering are also:
- Python 3 compatibility
- Editor support (Are there maintained TextMate bundles, for example?)
I admit I don't know anything about the following, except that they have ugly websites.