problems with eval()
Alex Martelli
aleaxit at yahoo.com
Fri Apr 27 03:59:16 EDT 2001
"Brian Forney" <bforney at cs.wisc.edu> wrote in message
news:mailman.988347820.9039.python-list at python.org...
> Hi,
>
> I am trying to use eval in Python 2.0. I am trying to use reo.sub() and a
[snip]
> error = results/cache/<import re; re.sub("config", "barnes.error",
> path);>
>
> --------------------
>
> Notice the embedded Python code in test.txt.
It looks to me as if these are *STATEMENTS*, while eval() handles
an *EXPRESSION*. Maybe you want to exec rather than eval()...?
Alex
More information about the Python-list
mailing list