Is there a way to "link" a python program from several files?

Brian Smith brian at briansmith.org
Sat Feb 16 16:47:22 EST 2008


Diez B. Roggisch wrote:
> Edward A. Falk schrieb:
> > IOW, is there a "linker" for python?  I've written a 
> > program comprised of about five .py files. I'd like to
> > find a way to combine them into a single executable.
> > Obviously, I could hand-edit them into a single 
> > .py file, but I'm looking for a way to keep them as 
> > seperate files for development but distribute the
> > result as a single file.

> Depending on the OS, there are several options. Ranging from 
> distributing an .egg (setuptools) over py2exe for windows to 
> py2app on OSX - and some more, e.g. cx_freeze.

I would be interested in a program that can combine multiple modules
into a single module, which removes all the inter-package imports and
fixes other inter-module references, like Haskell All-in-One does for
Haskell: http://www.cs.utah.edu/~hal/HAllInOne/index.html

- Brian




More information about the Python-list mailing list