local variable not found
Alex Martelli
aleax at aleax.it
Sun Apr 28 03:29:48 EDT 2002
Alain Tesio wrote:
...
>> (in my experience) only when used with explicit
>> dictionaries, NOT by letting them default to locals()
>> and globals().
>
> My problem is to make html templates where the user
> can insert python code.
I think there must be a zillion such beasts, and none
needs to use implicit dictionaries for exec / eval. There
are a couple on the Cookbook, for example; see e.g.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52305
which is of course my favourite since "my own baby".
Alex
More information about the Python-list
mailing list