hide python code !

Fuzzyman fuzzyman at gmail.com
Fri Aug 11 08:54:12 EDT 2006


Bayazee wrote:
> hi
> can we hide a python code ?
> if i want to write a commercial software can i hide my source code from
> users access ?
> we can conver it to pyc but this file can decompiled ... so ...!!
> do you have any idea about this ...?
>
> ---------------------------------------
> First Iranian Open Source Community : www.python.ir


You can distribute the compiled byte-code files (*.pyc) which are
harder to turn back into source code.

There was a product called decompyle which could do it, but although
there is a version floating around which works for Python 2.4 I've
never heard of anyone getting it to work.

Import hooks and encrypted source are a good option.

Py2exe embeds the byte-code file for your main script into the
executable which is also pretty good.

All of these make it hard enough to deter most people who will ever
want to abuse your source code. Until you have *lots* of users this is
probably enough.

I never understand the knee-jerk reaction on this mailing list to
answer people who ask this question by telling them they don't really
want to do it...

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml




More information about the Python-list mailing list