completely implicit interpolation based on a frame object

nn pruebauno at latinmail.com
Thu Dec 9 10:49:37 EST 2010


On Dec 9, 2:29 am, Edward Peschko <horo... at gmail.com> wrote:
> >> Any ideas would be great on this, including pitfalls that people see
> >> in implementing it.
>
> >http://docs.python.org/library/string.html#template-strings
>
> > regards
> >  Steve
>
> Steve,
>
> Thanks for the tip, I did look at templates and decided that they
> weren't quite completely what I was looking for, although they could
> be part of the solution.
>
> 1. they require ${ } around the variables in question that you want to
> interpolate. When run through the trace hook, normal code doesn't do
> that.
> 2. they don't provide (AFAICT) a complete interpolation solution.
> Suppose I want to define custom interpolations in my tracer, like say,
> expanding out lists and dicts, or fleshing out objects using their
> stringification method. Does template do this?
>
> Formats may be a bit closer here, but I'm not sure if they are
> workable (or usable) with 2.5... which is where I need to work.
>
> Ed

One of the solutions from here might work for you:

http://wiki.python.org/moin/Templating



More information about the Python-list mailing list