Charles G Waldman wrote: > If you're concerned about safety (the "eval" could be evaluating any > Python code, possibly a hazard if the string is coming from user > input) then you don't want to use eval at all. try: result = eval(string, {"__builtins__": {}}) or: import rexec r = rexec.RExec() result = r.r_eval(string) </F>