tags:

views:

353

answers:

3

im looking for simple script that will compile to exe , and i found py2exe before i decide to work with it , what do you think are the pros and cons of the py2exe tool?

+9  A: 

Pros:

  • Your app becomes standalone, can run on a PC without Python

Cons:

  • False sense of security, your app is still interpreted, it's just that the script is no longer visible but the byte code is and AFAIK it can be easily converted back to the source.
  • Large application size, the simplest script packaged with py2exe becomes several megabytes in size.
  • Potential problems, in certain cases(mostly if you use encodings) you need to retest your application as an exe and make sure everything works as expected, you may need to check in the code to find out if you are running inside py2exe and do something special.
  • May not work if your application depends on certain third-party python modules.

Check Py2exe homepage to find how to more and how to workaround some of these problems

Diaa Sami
+3  A: 

One con that I'm aware of: no support for Python 3.x. As far as I'm aware, there has been no work done on this (nothing in the SourceForge SVN repo anyway), and no plans for 3.x published on the py2exe site at this time.

Craig McQueen
+1  A: 

Look through the third-party libraries that you use. Some libraries (e.g. PIL) do tricks with conditional imports that make it hard for py2exe to bundle the right code. These issues can often be worked around, but a bit of googling up front might save you some headaches later.

John Fouhy