Selling Python Software

Alex Martelli aleax at aleax.it
Mon Nov 3 11:28:07 CET 2003


Will Stuyvesant wrote:

> Suppose I want to sell a (small, 1000 lines) Python program.  It is a
> commandline program for database applications and I have a customer.
> The customer wants to "try it out" before buying.  The try-out version
> should be a full, complete, version.
> 
> As much as I like the opensource movement, I have a problem now.  If I
> just give them the Python source code then they can show it to their
> programmers and they have no reason anymore to pay money to me.  Sure
> that would break our agreements, but you know bussiness, legal issues.
>  The thing the customer is interested in is the algorithm used in the
> program.  Not much I could do about such a scenario effectively.
> 
> I tried py2exe before, but someone told me it is always possible to
> decompile...revealing the source code.

Yes, exactly as could be done if you coded your precious algorithm
in C, machine-language, or whatever: if you distribute executable
code it CAN be cracked and the algorithm reverse-engineered (see any
warez site: game companies go to HUGE length to defend their programs
and they STILL get cracked anyway).


> Anybody has a solution to this, besides more legal paperwork (I am in
> europe...forget about claiming your rights here)?  Is it not possible
> to give away a Windows .exe file that can not be decompiled (or only
> with *extreme* difficulty)?

"Can not be decompiled" is impossible whatever language you're using.

"*extreme* difficulty" is in the eye of the beholder.  You can e.g.
add layers of encryption/decription to the bytecode, etc, but whatever
you do somebody else can undo.  Depending on the relative skills of
you and the "somebody else" the ratio (your effort to keep things
secret, to theirs to uncover them) can be any.

Couldn't you keep some crucial part of your precious algorithm OFF
the code you distribute, and have said code access said part via
webservices towards your personally-controlled, secure host?


Alex





More information about the Python-list mailing list