How can I sandbox Python in pure Python?
Posted
by Blixt
on Stack Overflow
See other posts from Stack Overflow
or by Blixt
Published on 2010-06-18T08:28:48Z
Indexed on
2010/06/18
8:33 UTC
Read the original article
Hit count: 461
I'm developing a web game in pure Python, and want some simple scripting available to allow for more dynamic game content. Game content can be added live by privileged users.
It would be nice if the scripting language could be Python. However, it can't run with access to the environment the game runs on since a malicious user could wreak havoc which would be bad. Is it possible to run sandboxed Python in pure Python?
If not, are there any open source script interpreters written in pure Python that I could use? The requirements are support for variables, basic conditionals and function calls (not definitions).
© Stack Overflow or respective owner