[IPython-dev] %install_ext question
Wed Apr 10 10:15:05 CDT 2013
On Tue, Apr 9, 2013 at 6:56 PM, Thomas Kluyver <firstname.lastname@example.org> wrote:
> Ah, sorry, I had got confused. Python can *run* a zip file containing a
> __main__.py file. It can't import a zip file.
Well, it worked for me to import code from the zip file, as long as the zip
file itself is on sys.path, ie, sys.path += ['/path/to/module-name.zip']
So it seems to me the three options are:
1) Specify that single python files can be installed via install_ext,
otherwise use pip. This is fine, pip is easy to use.
2) Allow install_ext to point to zip files and have install_ext unzip the
module into the extensions directory
3) Allow install_ext to point to zip files and modify the config file so
that sys.path is modified to contain the zip file itself on startup
Either 1 or 2 seems equally good to me and 1 has the advantage that it just
means modifying the docstring for install_ext to remove the reference to
the possibility of using zip files.
Option 3 seems a bit fragile compared to the other two, so I guess in the
end it doesn't really matter that python is capable of importing code
directly from zipfiles for this particular issue....
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev