Exemplo n.º 1
0
 def _create_runtime(self):
     """
     Return a restricted Lua runtime.
     Currently it only allows accessing attributes of this object.
     """
     return get_new_runtime(
         attribute_handlers=(self._attr_getter, self._attr_setter)
     )
Exemplo n.º 2
0
 def _create_runtime(self, lua_package_path):
     """
     Return a restricted Lua runtime.
     Currently it only allows accessing attributes of this object.
     """
     attribute_handlers=(self._attr_getter, self._attr_setter)
     runtime = get_new_runtime(attribute_handlers=attribute_handlers)
     self._setup_lua_paths(runtime, lua_package_path)
     return runtime
Exemplo n.º 3
0
 def _create_runtime(self, lua_package_path):
     """
     Return a restricted Lua runtime.
     Currently it only allows accessing attributes of this object.
     """
     attribute_handlers = (self._attr_getter, self._attr_setter)
     runtime = get_new_runtime(attribute_handlers=attribute_handlers)
     self._setup_lua_paths(runtime, lua_package_path)
     return runtime