How do (not) I distribute my Python progz?

Ben Sizer kylotan at gmail.com
Wed Dec 14 10:18:07 CET 2005


Tolga wrote:
> Let's suppose that I have written a Python program and, of course, want
> to show it to the world ;-)
>
> So, do I have to distrubute my source code? Or is there a way to hide
> my code?

Suggested solutions to this in the past have including using Py2exe (or
something like it) to create single-file distributables (viewable with
a zip program, however), writing custom import hooks to decode
encrypted modules, and storing valuable data online. It might even be
possible to do some sort of RMI and store useful parts of your code
online, although this requires a network connection and a
latency-insensitive application, which are by no means universal.

You could also consider moving your sensitive code to a compiled C
module, perhaps using something like Pyrex to make it fairly easy.

Obviously you will want to decide whether it's worth the effort to do
all this, because most of the time it won't be.

-- 
Ben Sizer




More information about the Python-list mailing list