I was more disappointed (but not surprised!) that "import pip" didn't work.
If it did (and it has big ramifications for how much of "python" (for some definition of "python" that includes most of the standard library) works. Eg sockets, interacting with some sort of "local" "file-system" etc) one could (this is handy if working on windows, and running python via cmd-r python.exe):
import pip
# pip.main expects a list of arguments, hence .split()
pip.main("install ipython".split())
# Only needed first
# time, as it installs ipython under site-packages.
# Only works if the user has write access, obviously
import IPython
IPython.start_ipython()
> That would be a total security nightmare and hopefully it's never going to happen.
Why? You're assuming a lot of things about a hypothetical implementation that is going to have heavy restrictions on in anyway since it's running in the javascript sandbox.