how can I execute a function string

Francis Avila francisgavila at yahoo.com
Tue Jan 13 17:37:39 EST 2004


Premshree Pillai wrote in message ...
>You need to use eval() to run code on-the-fly. See
>http://www.python.org/doc/current/lib/built-in-funcs.html

Eval only evaluates expressions, not statements. A function definition is a
statement.  (Think about it: what would eval() return?)

--
Francis Avila




More information about the Python-list mailing list