5 ms·
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 definiti
by e12e 12y ago
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()
- toyg 12y agoThat would be a total security nightmare and hopefully it's never going to happen. I'd be happy enough with serving .py files with the exact same restrictions and privileges that JS libraries have now.
- fragmede 12y ago> 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.
- e12e 12y agoHow is that worse than javascript loading javascript via AJAX?
- deleted 12y ago[deleted]