views:

138

answers:

3

I've got a piece of software which consists of several python sources and a couple of c++ libraries. I'd like to pack them in a executable single file, just like java does with .jar files. Is there a way to do that?

A: 

Sure is.

Ignacio Vazquez-Abrams
C extensions and .pyc files are not portable between OSes, Python versions therefore usefulness of binary eggs is debatable. Including python binary as in @UncleZeiv's answer solves part of the problem.
J.F. Sebastian
+4  A: 

You may want to have a look at py2exe, pyInstaller or others.

UncleZeiv
That's like packing the class files, the standard library, and the VM. Doesn't sound quite like is being asked.
Ignacio Vazquez-Abrams
possibly, but he mentions "executable"; he will decide :)
UncleZeiv
A: 

You can use python egg files, they are very similar to java jar files.

http://mrtopf.de/blog/python_zope/a-small-introduction-to-python-eggs/

cnobile