[CentralOH] Py2Exe and other notions

James -- Atlantix james at atlantixeng.com
Tue Mar 15 22:26:54 CET 2011


 

We have developed several sophisticated GUI applications at Atlantix, and
getting them into .exe with Py2Exe has only been possible with "simple"
applications. The main difficulty lies in the use of extension modules
(Matlplotlib, etc.) incorporated into the GUI. Py2Exe is a fragmented and
unfriendly program to any GUI that is more than mildly sophisticated. The
web is littered with people trying to get their app to compile with Py2Exe,
but it just *won't* work. 

 

As I mentioned earlier, distributing your Python GUI/modules as .pyc files
into site packages and possibly obfuscating one or more of the modules as an
.exe with IronPython or C# or even C is our adopted strategy for exe
distribution. 

 

This is what we have found as the most workable strategy. Compiling all of
your python modules into .pyc files and then installing them as a package
into site-packages will work. In fact we have written a small cluster of
programs to do this automatically, sort of like our own version of CxFreeze.
If you want further protection or more appropriately more of a rat maze for
hackers out there, take some portion of the program and compile it to an
.exe, then make a system call in your main GUI to this exe. Using IronPython
will allow the possibility to port existing python code in this manner. This
is why we recommend it versus going the C route. In the end, people will
become confused on how to hack your program on a windows platform if they
have to install Microsoft .NET4.0 AND Python for example. 

 

Our current implementation of a major PySide GUI is just that as above. We
did use CxFreeze to create a small .exe to call the main python program, and
have two packages installed under /Lib/site-packages. 

 

The major crime of programs such as Py2Exe or CxFreeze is spending countless
hours trying to get the application to work, when they will not, and all the
details of these program's (CxFreeze,Py2Exe,PyInstaller) operation is not
clear. So as a designer you are left with no clear path at all, and the
nature of making an .exe is not rocket science. What happens is that the
process of making a .exe becomes very disproportionate to the total
development time. In the end, this is similar to spending $2,500 on a stick
of margarine for $3 worth of cookie dough. 

 

James

 





 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20110315/752d8dc8/attachment.html>


More information about the CentralOH mailing list