title: How can I sandbox Python in pure Python?
body: <p>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.</p>
  
  <p>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?</p>
  
  <p><em>Update</em>: In fact, since true Python support would be way overkill, a simple scripting language with Pythonic syntax would be perfect.</p>
  
  <p>If there aren't any Pythonic script interpreters, are there any other 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).</p>