(self, sandbox, *args, **kwargs)
Executes the template function in the given sandbox.
Executes the template function in the given sandbox.
Executes the template function in the given sandbox .
def exec_in_sandbox(self, sandbox, *args, **kwargs):
        """Executes the template function in the given sandbox."""
        # Create a new function object associated with the execution sandbox
        glob = {
            self._global_name: sandbox,
            '__builtins__': sandbox._builtins
        }
        func = types.FunctionType(
            self._func.func_code,
            glob,
            self.name,
            self._func.func_defaults,
            self._func.func_closure
        )
        sandbox.exec_function(func, args, kwargs, self.path,
                              becomes_current_path=False)
def exec_in_sandbox ( self , sandbox , * args , * * kwargs ) : # Create a new function object associated with the execution sandbox glob = { self . _global_name : sandbox , '__builtins__' : sandbox . _builtins } func = types . FunctionType ( self . _func . func_code , glob , self . name , self . _func . func_defaults , self . _func . func_closure ) sandbox . exec_function ( func , args , kwargs , self . path , becomes_current_path = False )