parameters: (self, hooks = None, verbose = 0)
docstring: Returns an instance of the RExec class.
  
          The hooks parameter is an instance of the RHooks class or a subclass
          of it.  If it is omitted or None, the default RHooks class is
          instantiated.
  
          Whenever the RExec module searches for a module (even a built-in one)
          or reads a module's code, it doesn't actually go out to the file
          system itself.  Rather, it calls methods of an RHooks instance that
          was passed to or created by its constructor.  (Actually, the RExec
          object doesn't make these calls --- they are made by a module loader
          object that's part of the RExec object.  This allows another level of
          flexibility, which can be useful when changing the mechanics of
          import within the restricted environment.)
  
          By providing an alternate RHooks object, we can control the file
          system accesses made to import a module, without changing the
          actual algorithm that controls the order in which those accesses are
          made.  For instance, we could substitute an RHooks object that
          passes all filesystem requests to a file server elsewhere, via some
          RPC mechanism such as ILU.  Grail's applet loader uses this to support
          importing applets from a URL for a directory.
  
          If the verbose parameter is true, additional debugging output may be
          sent to standard output.
docstring_summary: Returns an instance of the RExec class.
docstring_tokens: Returns an instance of the RExec class .
function: def __init__(self, hooks = None, verbose = 0):
          """Returns an instance of the RExec class.
  
          The hooks parameter is an instance of the RHooks class or a subclass
          of it.  If it is omitted or None, the default RHooks class is
          instantiated.
  
          Whenever the RExec module searches for a module (even a built-in one)
          or reads a module's code, it doesn't actually go out to the file
          system itself.  Rather, it calls methods of an RHooks instance that
          was passed to or created by its constructor.  (Actually, the RExec
          object doesn't make these calls --- they are made by a module loader
          object that's part of the RExec object.  This allows another level of
          flexibility, which can be useful when changing the mechanics of
          import within the restricted environment.)
  
          By providing an alternate RHooks object, we can control the file
          system accesses made to import a module, without changing the
          actual algorithm that controls the order in which those accesses are
          made.  For instance, we could substitute an RHooks object that
          passes all filesystem requests to a file server elsewhere, via some
          RPC mechanism such as ILU.  Grail's applet loader uses this to support
          importing applets from a URL for a directory.
  
          If the verbose parameter is true, additional debugging output may be
          sent to standard output.
  
          """
  
          raise RuntimeError, "This code is not secure in Python 2.2 and later"
  
          ihooks._Verbose.__init__(self, verbose)
          # XXX There's a circular reference here:
          self.hooks = hooks or RHooks(verbose)
          self.hooks.set_rexec(self)
          self.modules = {}
          self.ok_dynamic_modules = self.ok_builtin_modules
          list = []
          for mname in self.ok_builtin_modules:
              if mname in sys.builtin_module_names:
                  list.append(mname)
          self.ok_builtin_modules = tuple(list)
          self.set_trusted_path()
          self.make_builtin()
          self.make_initial_modules()
          # make_sys must be last because it adds the already created
          # modules to its builtin_module_names
          self.make_sys()
          self.loader = RModuleLoader(self.hooks, verbose)
          self.importer = RModuleImporter(self.loader, verbose)
function_tokens: def __init__ ( self , hooks = None , verbose = 0 ) : raise RuntimeError , "This code is not secure in Python 2.2 and later" ihooks . _Verbose . __init__ ( self , verbose ) # XXX There's a circular reference here: self . hooks = hooks or RHooks ( verbose ) self . hooks . set_rexec ( self ) self . modules = { } self . ok_dynamic_modules = self . ok_builtin_modules list = [ ] for mname in self . ok_builtin_modules : if mname in sys . builtin_module_names : list . append ( mname ) self . ok_builtin_modules = tuple ( list ) self . set_trusted_path ( ) self . make_builtin ( ) self . make_initial_modules ( ) # make_sys must be last because it adds the already created # modules to its builtin_module_names self . make_sys ( ) self . loader = RModuleLoader ( self . hooks , verbose ) self . importer = RModuleImporter ( self . loader , verbose )