.oO SearXNG Developer Documentation Oo.
|
Functions | |
_eval_expr (expr) | |
_eval (node) | |
timeout_func (timeout, func, *args, **kwargs) | |
post_search (_request, search) | |
Variables | |
str | name = "Basic Calculator" |
description = gettext("Calculate mathematical expressions via the search bar") | |
bool | default_on = True |
str | preference_section = 'general' |
str | plugin_id = 'calculator' |
logger = logger.getChild(plugin_id) | |
dict | operators |
Calculate mathematical expressions using ack#eval
|
protected |
Definition at line 53 of file calculator.py.
References searx.plugins.calculator._eval().
Referenced by searx.plugins.calculator._eval(), and searx.plugins.calculator._eval_expr().
|
protected |
>>> _eval_expr('2^6') 4 >>> _eval_expr('2**6') 64 >>> _eval_expr('1 + 2*3**(4^5) / (6 + -7)') -5.0
Definition at line 37 of file calculator.py.
References searx.plugins.calculator._eval().
searx.plugins.calculator.post_search | ( | _request, | |
search ) |
Definition at line 90 of file calculator.py.
References searx.plugins.calculator.timeout_func().
searx.plugins.calculator.timeout_func | ( | timeout, | |
func, | |||
* | args, | ||
** | kwargs ) |
Definition at line 66 of file calculator.py.
Referenced by searx.plugins.calculator.post_search().
bool searx.plugins.calculator.default_on = True |
Definition at line 19 of file calculator.py.
searx.plugins.calculator.description = gettext("Calculate mathematical expressions via the search bar") |
Definition at line 18 of file calculator.py.
searx.plugins.calculator.logger = logger.getChild(plugin_id) |
Definition at line 24 of file calculator.py.
str searx.plugins.calculator.name = "Basic Calculator" |
Definition at line 17 of file calculator.py.
dict searx.plugins.calculator.operators |
Definition at line 26 of file calculator.py.
str searx.plugins.calculator.plugin_id = 'calculator' |
Definition at line 22 of file calculator.py.
str searx.plugins.calculator.preference_section = 'general' |
Definition at line 21 of file calculator.py.