tags:

views:

1155

answers:

2

Is there a way to make a portable/stand-alone exe for python apps?

I've read about p2exe but it doesn't support the latest version. I'm reluctant to go to 2.6 because I'd rather stay with the latest version instead of worrying about incompatibilities as soon as 2.6 becomes too outdated.

+5  A: 

cx_freeze has worked for me. Here's a link. The page claims to support 3.1. Good luck!

http://cx-freeze.sourceforge.net/

Carl Norum
Cool, never heard of before.
Lennart Regebro
To be honest I've never tried on 3.1, but it does work well for older stuff, so I presume they're not just lying to us! =)
Carl Norum
Also check http://www.mail-archive.com/[email protected]/msg00212.html to get around some errors you might receive when building.
Matze
A: 

<rant>

You should deffinetly go with Python 2.6.x.

Python 3.x still lacks on most of the usefull libraries that make Python useful. Python 2.6.x includes many of the features included in 3.x, and the whole 2.x codeline will be supported for years. Python 2.7 is planned, and wouldn't be surprised if there were a 2.8 some time in the future.

You can write using some of the most useful features from 3.x in 2.5, using the from __future__ imports.

Remember 2.x isn't going anywhere in the short term. Many distributions still ship with Python 2.4, and there are enough people out there mainaining compatibility with 2.3 (Django, for example).

The differences between 3 and 2.6 are small enough be easy to automatically port 2.6 code to 3 (with 2to3) when you really want to, while still having access to your needed libraries in the meantime.

</rant>

voyager