[CentralOH] Py2Exe and other notions

Morgan Goose morgan.goose at gmail.com
Fri Mar 18 15:08:45 CET 2011


Just to make mention, a pyc file is plain text bytecode, and reversible. So if
you just want your libraries unreadable, then yeah making them into an exe and
accesses it like one would a complied C lib is useful, but if you main biz
code is still in pyc, anyone can get at it. It's same with java in this manner
too.

goose

On Tue, Mar 15, 2011 at 05:26:54PM -0400, James -- Atlantix wrote:
>     
> 
>    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
> 
>     
> 
>     

> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> http://mail.python.org/mailman/listinfo/centraloh

---end quoted text---


More information about the CentralOH mailing list