protecting the python code.

N

nell

Hi all,
I've developed a testing application in python, and should supply it in
a way that no one (lets say they are regular users) will understand it
and edit it.
The application source is all python but we expose a UI written in C#
that go over all our code and expose to user functions (Indicated with
a special prefix).
So the problem on one hand is protecting the source and make it less
accessible ond on the other hand to make it available for the UI.
10x in advance
 
S

Steve Holden

nell said:
Hi all,
I've developed a testing application in python, and should supply it in
a way that no one (lets say they are regular users) will understand it
and edit it.
The application source is all python but we expose a UI written in C#
that go over all our code and expose to user functions (Indicated with
a special prefix).
So the problem on one hand is protecting the source and make it less
accessible ond on the other hand to make it available for the UI.
10x in advance

Before I spend *any* time explaining why this is probably a bad idea,
not to mention impossible, I'd need to be convinced that your code is
worth protecting in the first place :)

Why is *your* code so much more valuable than any other commercial
Python code currently distributed in non-obfuscated form?

Paranoia can be taken too far.

What does "10x in advance" mean?

regards
Steve
 
N

nell

Hi Steve,
First the "10x in advance" means thanks in advance.
The main importance of protecting my code is to save headache of
customers that want to be smart and change it and then complain on bugs
and problems.

10x
 
B

Bob Smith

nell said:
Hi Steve,
First the "10x in advance" means thanks in advance.
The main importance of protecting my code is to save headache of
customers that want to be smart and change it and then complain on bugs
and problems.

10x

I'd say that's more of a policy issue than a technical issue. You have a
contract or agreement with your customers, right? Just place a cluase in
it that addresses your concerns. You don't have to support people who
have altered your code... nor should they expect to be supported.
 
S

Steve Holden

nell said:
Hi Steve,
First the "10x in advance" means thanks in advance.
The main importance of protecting my code is to save headache of
customers that want to be smart and change it and then complain on bugs
and problems.

10x
I'd have understood "tnx", never seens 10x b4 :)

Your concerns are what licensing's for. ("No support on modified copies"
would be a good heading for a section addressing this issue).

With good enough release controls you can verify the code is unmodified
using md5 checksums or similar.

If a customer's good enough at Python to disassemble your .pyc files,
they will probably tell you they've modified your code when the support
queries come in :)

regards
Steve
 
A

Andrey Tatarinov

nell said:
First the "10x in advance" means thanks in advance.
The main importance of protecting my code is to save headache of
customers that want to be smart and change it and then complain on bugs

also you can try to use py2exe
 
A

A.B., Khalid

nell said:
Hi all,
I've developed a testing application in python, and should supply it in
a way that no one (lets say they are regular users) will understand it
and edit it.
The application source is all python but we expose a UI written in C#
that go over all our code and expose to user functions (Indicated with
a special prefix).
So the problem on one hand is protecting the source and make it less
accessible ond on the other hand to make it available for the UI.
10x in advance



You basically have two options:

1. Use Pyrex to compile your application to be used as (a) module(s).
2. Use Pyrex to compile your application and embed Python in it.

The first option is probably the easier of the two, and it only
requires that you install Pyrex
(http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/) and that you
study the Docs and the Demos in their respective directories.

The second option is more involved but is still possible. You need to
follow this:
http://lists.copyleft.no/pipermail/pyrex/2004-June/000822.html

Many people use Pyrex to write Python extensions only. But given the
obvious absence of competitors to address the issue of the protecting
of python code, for whatever reason, then I think it is safe to say
that Pyrex is now in a unique position to address that issue as well.
Please be kindly reminded that even py2exe-- although a great
undertaking-- is not AFAIK currrently that protective of your code--
not that it ever claimed it is so-- as draging the resulting exe file
to your zip archiever will reveal the python code inside your exe file.
And so in short: try the Pyrex way.


Regards,
Khalid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top