[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"How to protect the python code"

On 9/5/19 2:48 AM, Saba Kauser wrote:
> I am looking for ways available to protect the python source code
> from being available to users for write/modify. Is it a good idea to
> think that python source code can be protected?
In general, no, not with an interpreted language.

Intellectual property is protected by copyright and patents. The Python
code you write is copyright by you and by few rights are granted to the
end user by default, as governed by the license you subject them to.
Copyright holds whether a person can view the source code or not.

And of course in the case of patents that means everything must be
published for all to see, so these are open by nature. (They aren't
secret to begin with.)

Most end users have very little curiosity about reading your Python
code.  In fact they don't even know or care that it is Python. Trying to
hide or obfuscate the code is pointless in my opinion, and a waste of
time and money.

I've never understood why companies are so obsessed with preventing
users from modifying their programs.  If a program doesn't quite meet
the needs of the end user, and it is possible for him to modify it to do
so, I say go for it.  As long as he doesn't distribute a a derivative
product and violate the copyright, I don't see the problem.

On one occasion I was using a proprietary Java application (compiled of
course) that had a silly thing where it would refuse to run under some
graphics conditions, such as 16-bit color over RDP.  So I decompiled the
class where the check was and changed it.  There were good reasons for
this check, but in my case it didn't matter.