osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calculator


Considering just basic calculator with eval it could be possible search
eval string if it only contains digits, parenthensis and operators.
Assuring no letter (maybe except e for expotential) and special
characters this calculator should be quite safe.

But I give no any warranty for such security.

Cheers,
   Marek Mosiewicz

W dniu ?ro, 15.01.2020 o godzinie 18?09?+0100, u?ytkownik Python
napisa?:
> Le 15/01/2020 ? 16:34, andershe02 at gmail.com a ?crit :
> > Thanks!
> 
> Do not try it, though, with a expression such as
> import os; os.system('rm -rf ~/*').
> 
> 
>