[Python-Dev] Reviving restricted mode?
matsjoyce
matsjoyce at gmail.com
Wed Aug 13 18:19:14 CEST 2014
Unless you remove all the things labelled "keep away from children". I wrote
this sandbox to allow python to be used as a "mods"/"add-ons" language for a
game I'm writing, hence the perhaps too strict nature.
About the crashers: as this is for games, its "fine" for the game to crash,
as long as the sandbox is not broken while crashing.
time and math can probably be allowed, but random imports a lot of
undesirable modules.
My sandbox doesn't use proxies, due to the introspection and complexity that
it involves. Instead it completely isolates the sandboxed globals, and checks
all arguments and globals for irregularities before passing control to non-
sandboxed functions.
More information about the Python-Dev
mailing list