[Python-Dev] Importing packages from command line
Nick Coghlan
ncoghlan at iinet.net.au
Mon Dec 22 05:50:01 EST 2003
Dmitry Vasiliev wrote:
> The main idea is to treating package as a program and run package
> initialization code from command line. The advantage is zipping all
> program modules in one zip archive and running the program from command
> line without unzipping it, like Java's jar's. But this idea need more
> thoughts however...
>
python runzip.py mypkg.zip
where runzip.py is a pure Python script that works as you suggest.
I'm fairly sure zipimport would allow you to write the program you
describe in pure Python. I've obviously never written such a program,
though.
It's certainly an interesting packaging idea for small Python programs
with several files, but for which a full-blown installer would be overkill.
Cheers,
Nick.
--
Nick Coghlan | Brisbane, Australia
Email: ncoghlan at email.com | Mobile: +61 409 573 268
More information about the Python-Dev
mailing list