On 3/11/13 12:51 PM, jelle feringa wrote:
Its great to have a method of distributing a Python project that does not include the source code.
I just want to clarify for everyone reading this: PyInstaller bundles basically do include the Python source code for your application, the bundle could be deconstructed to reveal the source code. PyInstaller provides convenience, but it does not provide secrecy.
Some languages are very easy to decompile, such as Java and C#. In theory it would be easy to decompile a PyInstaller bundle, but in practice I suspect nobody has written a tool to do it yet.
If you want to hide your source code, then I recommend using Cython with PyInstaller. Cython is a toolchain that can convert Python code (with a few minor restrictions) into C code, and then you can compile the C code into machine code. Cython by default creates CPython extentions, so you can import the Cython modules from normal Python modules. Thus, you can compile most of your application with Cython to create machine code (thus hiding the source code), and you can use just a small Python bootloader that imports your Cython code. Then you point PyInstaller at the Python bootloader and you use that to make the PyInstaller executable.
Cython is very interesting behind the scenes. It does turn Python into C, but the generated C code uses the Python.h library extensively. Cython is also nice because you can use optional static type declarations, which make your code faster - often Cython is 100 to 1,000 times faster than normal Python. And the code still looks like Python, it is great.
Good luck, Zak Fallows -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
