Technical Answer - Protecting code in python

Steven D'Aprano steve at
Wed Mar 21 17:23:55 CET 2007

On Wed, 21 Mar 2007 06:36:16 -0700, flit wrote:

> 1 - There is a way to make some program in python and protects it? I
> am not talking about ultra hard-core protection, just a simple one
> that will stop 90% script kiddies.

Protect it from what? Viruses? Terrorists? The corrupt government? Your
ex-wife cutting it up with scissors? People who want to copy it? People
who will look at your code and laugh at you for being a bad programmer?

Until you tell us what you are trying to protect against, your question
is meaningless.

Is your program valuable? Is it worth money? Then the 90% of script
kiddies will just wait three days, and download the program off the
Internet after the real hackers have broken your protection.

If it is NOT valuable, then why on earth do you think people will put up
with whatever "protection" you use? Why won't they just use another

> 2 - If I put the code in web like a web service, how can I protect my
> code from being ripped? There is a way to avoid someone using my site
> and ripping the .py files?

Don't make the .py files available on the web server.

[penny drops]

Hang on, you want us to believe that you're a serious computer programmer
with a seriously valuable program that's worth "protecting", and you don't
know that? I smell a troll.


More information about the Python-list mailing list