python sandbox

Uwe Schmitt uwe.schmitt at procoders.net
Thu Jan 23 11:02:56 EST 2003


Gumuz <gumuz at looze.net> wrote:
> i didn't take a very close look at it yet, but it seems that your
> allowlist&disallowlist make it possible to create some sort of subset of
> python

that is how it works: the exec statement can be called with
a manipulated globals() dictionary. So if one builds this dictionary
without the entry 'file', file access is not possible.
I expanded this technique, so one can load modules with
restricted access. 

Greetings, Uwe.



-- 
Dr. rer. nat. Uwe Schmitt      Computer science is no more about Computers,
uwe.schmitt at num.uni-sb.de      than astronomy is about telescopes. (Dijkstra)
http://www.procoders.net           




More information about the Python-list mailing list