On Tue, Nov 25, 2008 at 3:14 PM, Lie Ryan <[EMAIL PROTECTED]> wrote: > Instead, in python 2.6, you may use ast.literal_eval(). Which restrict > the eval to literal syntax only, and prohibit any function calling.
That's very cool, thanks! > Alternatively, for previous versions of python, or for more flexibility, > you may use the safeeval like here: http://lybniz2.sourceforge.net/ > safeeval.html It looks like it wouldn't be hard to port ast.literal_eval to Python 2.5... Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
