Is it possible to protect python source code by compiling it to .pyc or .pyo?

Ethan Furman ethan at stoneleaf.us
Thu Jan 16 20:21:38 EST 2014


On 01/16/2014 05:09 PM, Chris Angelico wrote:
> On Fri, Jan 17, 2014 at 11:58 AM, Sam <lightaiyee at gmail.com> wrote:
>> I would like to protect my python source code. It need not be foolproof as long as it adds inconvenience to pirates.
>>
>> Is it possible to protect python source code by compiling it to .pyc or .pyo? Does .pyo offer better protection?

No and no.

> Distribute your code with a copyright notice, accept that a few people
> will rip you off, and have done with it.

Yes.  One of the nice things about Python is being able to fix bugs myself [1].

--
~Ethan~


[1] Yes, I file upstream bug reports.  :)



More information about the Python-list mailing list