<%! import string def tagit(text): return "%s" % (text,) %> Simple Python Expression : ${a} + ${b} = ${a + b} Python Expression with a builtin : pow(${a}, ${b}) = ${pow(a, b)} Python Expression with tagit : ${tagit('test')} Filtering with u : ${"this is (was) a test" | u} Filtering with h : ${"" | h} Filtering with trim : ${" this is a test " | trim} Filtering with u,trim : ${" this is a test " | u,trim} Filtering with trim,u : ${" this is a test " | trim,u} Filterint with string.upper : ${"this is a test" | string.upper} Filtering with tagit : ${"tagged text" | tagit}