TenjintShell.init_virtualenv

TenjintShell.init_virtualenv()

Add a virtualenv to sys.path so the user can import modules from it. This isn’t perfect: it doesn’t use the Python interpreter with which the virtualenv was built, and it ignores the –no-site-packages option. A warning will appear suggesting the user installs IPython in the virtualenv, but for many cases, it probably works well enough.

Adapted from code snippets online.

http://blog.ufsoft.org/2009/1/29/ipython-and-virtualenv