I spent some time reading the docs to the Template Toolkit. It's very cool despite the fact that you can embed code in the templates or maybe because it allows you pass whole objects around the templates as substitution variables. This actually makes the creepiness of the code in templates dilemma that much worse, but it's just so cool.