extracting string.Template substitution placeholders

Eric S. Johansson esj at harvee.org
Sun Jan 12 10:08:31 EST 2014


As part of speech recognition accessibility tools that I'm building, I'm 
using string.Template. In order to construct on-the-fly grammar, I need 
to know all of the identifiers before the template is filled in. what is 
the best way to do this?

can string.Template handle recursive expansion i.e. an identifier 
contains a template.

Thanks
--- eric



More information about the Python-list mailing list