| Home | Trees | Indices | Help |
|
|---|
|
|
A pseudo-eval-sandbox. - Allow only some of the builtin python-functions (see eval_allowed_globals), which are considered "save". - Forbid names beginning with "_". This is to prevent things like '0 .__class__', with which you could easily break out of a "sandbox". Note that this is no real sandbox! Don't use it for untrusted code!!
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
eval_allowed_globals =
|
|||
|
|||
Add an object to the "allowed eval-globals". Mainly useful to add user-defined functions to the pseudo-sandbox. |
Compile a python-eval-expression.
- Use a compile-cache
- Raise an NameError if expr contains a name beginning with '_'.
:Returns: the compiled expr
:Raises: SyntaxError for compile-errors,
NameError if expr contains a name beginning with '_'
|
Eval a python-eval-expression. Uses the compile-cache. |
|
|||
eval_allowed_globals
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Aug 1 18:44:55 2012 | http://epydoc.sourceforge.net |