Packaging packages?

Fredrik Lundh fredrik at pythonware.com
Thu Dec 9 11:38:08 EST 1999


Jeffrey Kunce <kuncej at mail.conservation.state.mo.us> wrote:
> Is there a way to collect all the python modules in a package into one file?
> I'm thinking of something like a "DLL for python code". It would be
> nice if the normal import syntax would work transparantly on such files, 
> as well as with the standard directory-based packages.

you can use Greg Stein's imputil.py [1] for this.  see
my reply in the recent "Embedding questions" for a
code sample.

> I've been a big fan of Fredrik's "Squeeze" and Gordon's "Win32 Installer",
> but as far as I know, they pakage an entire application into one file.
> I'm looking for a little more modularity than that, and something that
> can be imported from native python.

iirc, Gordon's stuff is about as modular as it can be.
using it to create library packages shouldn't be much
of a problem.

> Is this already available? If not, has anyone worked on this? 
> Does anyone else see the need?

obviously :-)

(we've fixed it in pythonworks too, of course)

</F>

1) http://www.lyra.org/greg/python/imputil.py





More information about the Python-list mailing list