.oO SearXNG Developer Documentation Oo.
|
Classes | |
class | SXNGPlugin |
Functions | |
_eval_expr (expr) | |
_eval (node) | |
handler (multiprocessing.Queue q, func, args, **kwargs) | |
timeout_func (timeout, func, *args, **kwargs) | |
Variables | |
mp_fork = multiprocessing.get_context("fork") | |
Calculate mathematical expressions using :py:obj:`ast.parse` (mode="eval").
|
protected |
Definition at line 122 of file calculator.py.
References _eval().
Referenced by _eval(), and _eval_expr().
|
protected |
>>> _eval_expr('2^6') 64 >>> _eval_expr('2**6') 64 >>> _eval_expr('1 + 2*3**(4^5) / (6 + -7)') -5.0
Definition at line 106 of file calculator.py.
References _eval().
searx.plugins.calculator.handler | ( | multiprocessing.Queue | q, |
func, | |||
args, | |||
** | kwargs ) |
Definition at line 135 of file calculator.py.
searx.plugins.calculator.timeout_func | ( | timeout, | |
func, | |||
* | args, | ||
** | kwargs ) |
Definition at line 143 of file calculator.py.
Referenced by searx.plugins.calculator.SXNGPlugin.post_search().
searx.plugins.calculator.mp_fork = multiprocessing.get_context("fork") |
Definition at line 103 of file calculator.py.