title: Run checks against user-generated Python code
body: <p>I am trying to make a website where users can program in Python, or Octave. Much like on the e-learning website <a href="https://www.udacity.com/" rel="nofollow noreferrer">Udacity</a>. The user enters his code on the website and this is then sent to a webserver which processes the code and returns the response to the user. I got it working, but I think it's highly unsafe since I do not run any checks against the code. I read <a href="https://stackoverflow.com/questions/12427361/how-does-udacity-web-python-interpreter-work">here</a> that Udacity ships the code off to a sandboxed cluster and runs their own tests against it to see if it passes.</p>
  
  <p>So my question is this: what can happen if I don't run checks against this code? Could my whole website be deleted by a clever, malicious user? And what should I test this code for to make sure "nothing bad happens"?</p>