Package PyFoam :: Package Basics :: Module TemplateFile :: Class EvalPseudoSandboxWithMath
[hide private]
[frames] | no frames]

Class EvalPseudoSandboxWithMath

source code

ThirdParty.pyratemp.EvalPseudoSandbox --+
                                        |
                                       EvalPseudoSandboxWithMath

Add mathematical functions to the valid functons

Instance Methods [hide private]
 
__init__(self, allowExec=False) source code
 
compile(self, expr, mode="eval")
Compile a python-eval-expression.
source code
 
eval(self, expr, locals)
Eval a python-eval-expression.
source code

Inherited from ThirdParty.pyratemp.EvalPseudoSandbox: f_default, f_exists, f_import, f_setvar, register

Class Variables [hide private]

Inherited from ThirdParty.pyratemp.EvalPseudoSandbox: safe_builtins, safe_builtins_python2

Method Details [hide private]

__init__(self, allowExec=False)
(Constructor)

source code 
Overrides: ThirdParty.pyratemp.EvalPseudoSandbox.__init__

compile(self, expr, mode="eval")

source code 

Compile a python-eval-expression. Overrides the default implementation to allow '_[1]' as a valid name

Overrides: ThirdParty.pyratemp.EvalPseudoSandbox.compile

eval(self, expr, locals)

source code 

Eval a python-eval-expression.

Sets ``self.locals_ptr`` to ``locales`` and compiles the code before evaluating.

Overrides: ThirdParty.pyratemp.EvalPseudoSandbox.eval