JAR equivalent in Gordon McMillan's Installer

Thomas Heller theller at python.net
Fri Feb 15 12:03:13 EST 2002


"Paul Moore" <paul.moore at atosorigin.com> wrote in message news:2upn6uoqotqejiji69bg8kebfacdu9oamb at 4ax.com...
> 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?

Have you looked into /F's squeeze? Should exactly do what you want,
from the description...

Thomas





More information about the Python-list mailing list