JAR equivalent in Gordon McMillan's Installer

Paul Moore paul.moore at atosorigin.com
Thu Feb 14 11:56:21 EST 2002


One nice feature of Java (sorry!) is the ability to ship an application
as a single JAR file - containing all code, resources, etc, etc. Is
there any equivalent feature available in Python? The obvious place
where it would be is in Gordon McMillan's Installer package, with its
Python Archive format, but I don't think (from looking at the docs) that
does quite what I'm after.

I have no requirement to include a Python interpreter, or C extensions,
in the archive. The code is all pure Python. But, I do want to be able
to include support files (text files, image files for use in wxPython
toolbars, graphics for display on screen, sound files, etc etc) which
can be picked up from the same archive.

I'm looking for something which works a bit like Java's
ClassLoader.getResourceAsStream() (along with the necessary stuff to
allow the stream to then be *used* as an icon/image/whatever).

It seems like the sort of thing which should be possible with Python,
but I can't find it. Did I miss something?

Thanks in advance,
Paul.




More information about the Python-list mailing list