On 17/01/2014 06:07, gmflanagan wrote:
On Sunday, January 12, 2014 3:08:31 PM UTC, Eric S. Johansson wrote:
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
On Sunday, January 12, 2014 3:08:31 PM UTC, Eric S. Johansson wrote:
> 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 i
On 1/13/2014 2:24 AM, Steven D'Aprano wrote:
On Sun, 12 Jan 2014 10:08:31 -0500, Eric S. Johansson wrote:
Now just walk the template for $ signs. Watch out for $$ which escapes
the dollar sign. Here's a baby parser:
found a different way
import string
cmplxstr="""a simple $string a longer $s
On Sun, 12 Jan 2014 10:08:31 -0500, Eric S. Johansson wrote:
> 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 wa
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.