rexec.RExec.s_import

RExec.s_import(*args)[source]

Import a module, raising an ImportError exception if the module is considered unsafe.

This method is implicitly called by code executing in the restricted environment. Overriding this method in a subclass is used to change the policies enforced by a restricted environment.

Similar to the r_import() method, but has access to restricted versions of the standard I/O streams sys.stdin, sys.stderr, and sys.stdout.