[EMAIL PROTECTED] writes:
> Q: How can I tell Python to calculate what quoted strings and numbers
> mean, without also accidentally accepting OS commands as input?
> 
> A: eval(source, {'builtins': {}})

That is dangerous.  Consider source = "9**9**9".  There's a better
recipe on ASPN:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/364469
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to