Safe expression parser in Python

Viewed 13797

How can I allow users to execute mathematical expressions in a safe way? Do I need to write a full parser?

Is there something like ast.literal_eval(), but for expressions?

5 Answers
Related