>
> I guess I always assumed things like cherrypy used something simpler than
> spawning a whole new interpreter instance (what it actually does). TIL.
> Though hacking import hooks looks like a fun alternative even if it would
> most likely be an unsafe nightmare.
>
Haha, yeah, almost all of those web frameworks, wsgi, etc spawn new
interpreters.  It turns out that this is basically the only safe way to
sandbox Python:
http://www.pyvideo.org/video/2585/building-and-breaking-a-python-sandbox