template engine

piotr piotrlewalski at gmail.com
Sat Jan 13 19:29:25 CET 2007


I'm looking for a template engine that can give me names of required
variables in parse time.
Calculation of a value for a specific variable name could be possibly done
in specified callback function.

For example:

 #if user
  hello $user/name
  hello guest

for above document engine should call my function first giving an argument
"title", then second time with argument "user", and optionally if result
for user was not empty call function again with argument "user/name"
then engine should replace specific placeholders with results of my
callback function
obviously this is just example syntax, I hope you catch the idea

that would be nice if engine could work with non HTML documents.

thanks in advance for your help, and sorry for my English :)

More information about the Python-list mailing list