Commit Graph

4 Commits

Author SHA1 Message Date
rajjagirdar-root
bde60ad530 Add safe expression evaluator (calc/engine/evaluator.py + builtins.py)
- evaluator.evaluate(expr, extra_names) returns (result_str, is_error)
- blocks __builtins__ to prevent arbitrary code execution
- handles ZeroDivisionError, ValueError, NameError with friendly messages
- builtins.SAFE_NAMES covers trig, hyperbolic, log, exp, rounding, constants
2026-05-13 11:24:44 -04:00
The Octocat
7fd1a60b01 Merge pull request #6 from Spaceghost/patch-1
New line at end of file.
2012-03-06 15:06:50 -08:00
Johnneylee Jack Rollins
762941318e New line at end of file. --Signed off by Spaceghost 2011-09-13 21:42:41 -07:00
cameronmcefee
553c2077f0 first commit 2011-01-26 11:06:08 -08:00