obviscating python code for distribution

Daniel Kluev dan.kluev at gmail.com
Sun May 15 22:21:00 EDT 2011


On Mon, May 16, 2011 at 1:04 PM, Littlefield, Tyler <tyler at tysdomain.com> wrote:
> Hello all:
> Finally, is there a good way to accomplish this? I know that I can make .pyc
> files, but those can be disassembled very very easily with the disassembler
> and shipping these still means that the person needs the modules that are
> used. Is there another way to go about this?

No, there is no way to prevent users from getting access to raw python
sources. By its nature and design, python is not meant to be used this
way, and even obfuscation would not harm readability much.
However, you can write all parts you want to hide in C/C++/Cython and
distribute them as .so/.dll

-- 
With best regards,
Daniel Kluev



More information about the Python-list mailing list