How to protect python code ?

Davor Cengija dcengija_remove_ at inet.hr
Thu Apr 3 10:53:15 CEST 2003


christophe grimault wrote:

> 
> One way is to deliver only .pyc files, but I guess this is quite a poor
> protection, uh ?

There is at least one decompiler available on the net, so delivering .pyc 
only doesn't make any sense.

> 
> An other way is to move some parts to a C API ext module and deliver
> only the .so,
> but this is quite time consuming ...
> 

I'd try with python-to-exe compiler. Read this: 
http://www.mcmillan-inc.com/install1.html . I tried it on both Linux and 
Windows and it really works good, even with GUI intensive applications. No 
problems so far. I don't know, however, how easy is to decompile the 
binaries produced in such a way. Anyway, if somebody really really wants to 
steal your algorithm, he/she will probably find a way to do that. With 
delivering .exe (and .so) you make that process a little bit more difficult.

And as a side-effect, it turns your 10k python source into 15MB binary 
installation, which automatically makes a respectable developer from you 
:-))

-- 
Davor Cengija, dcengija_remove_ at inet.hr




More information about the Python-list mailing list