views:

156

answers:

3

I want to distribute a Python application to windows users who don't have Python or the correct Python version.

I have tried py2exe conversion but my Python program is really complex and involve code import on the fly by xmlrpc process so it is not suitable for py2exe.

The complete Python folder takes around 80MB but this includes docs and a lot of non-essential things.

Do you know if there exists a small package of a minimal Python interpreter I can include with my program ? Include a folder of 80MB is a bit big ;)

+2  A: 

Have a look at Portable Python. This will install a Python programming environment in a local folder. I am sure that you could strip many unwanted things off.

I recommend however that you give py2exe another chance.

kgiannakakis
+2  A: 

PyInstaller is a py2exe "competitor" that has many extras (such as being cross-platform, supporting popular third party packages "out of the box", and explicitly supporting advanced importing options) -- it might meet your needs. Just be sure to install the SVN trunk -- the existing (1.3) release is way, WAY obsolete (PyInstaller is under active development again since quite a while, but I can't convince the current maintainers to stop and do a RELEASE already -- they're kind of perfectionists and keep piling more and more great goodies, optimizations, enhancements, etc, into the SVN trunk instead;-).

Alex Martelli
A: 

..involve code import on the fly by xmlrpc process so it is not suitable for py2exe

Py2exe can deal with situations like this. You just have to tell it which modules are being imported at runtime, so that it includes them in the distribution. Your code should then be able to import from these modules dynamically.

Tartley