would be nice: import from archive

Alex Martelli aleaxit at yahoo.com
Fri Aug 27 13:37:45 EDT 2004


Dan Perl <dperl at rogers.com> wrote:

> Here is a python feature that I would like: to be able to import modules
> from an archive like the jar files in Java.  Maybe a regular tar file?

Python 2.3 lets you import modules from a zipfile.  The zip format is
better than tar when you just need to get one file from it, which is why
java's jar files are also basically zipfiles.

> I am quite new to python so I should ask first whether there is already
> something like that, although I did a search already.  Or maybe such a
> feature has already been discussed somewhere?  If this is an original idea,
> how can I propose it for future releases?

It's there already, and has been for over a year now;-).


Alex



More information about the Python-list mailing list