March 2003
Intermediate to advanced
656 pages
39h 30m
English
r_import, s_import
r.r_import(modname[,globals[,locals[,fromlist]]])
r.s_import(modname[,globals[,locals[,fromlist]]])Imports the module modname into the
restricted environment. All parameters are just like for built-in
function __import__, covered in Chapter 7. r_import raises
ImportError if the module is considered unsafe. A
subclass of RExec may override
r_import, to change the set of modules available
to import statements in untrusted code and/or to
otherwise change import functionality for the
sandbox.