Run pyc file without specifying python path ?

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Thu Jul 30 12:20:24 CEST 2009


On Thu, 30 Jul 2009 07:01:28 +0100, Barak, Ron wrote:

> I wanted my application to "hide" the fact that it's a python script,
> and look as much as possible like it's a compiled program.

What do you think the "c" in .pyc stands for?

What it's not is a compiled to machine-code stand alone executable.


> The reason I don't just give my user a py file, is that I don't want 
> a cleaver user to change the innards of the script.

It's not the clever users you need to worry about, because they'll fix 
your bugs. It's the not-as-clever-as-they-think-they-are users you have 
to worry about. But frankly, the best way to deal with them is to make it 
absolutely clear that you don't provide free support for modified 
versions of the script, and as soon as they report a problem, you diff 
their version with the official version. If they vary, then you start 
charging them.

Before you go spending vast amounts of time and energy creating a fragile 
solution, it's worth you working out what it actually is you're trying to 
prevent. If it's just "I don't want anybody touching my precious, 
precious code!" then I have no sympathy and have no interest in helping 
you. If it's "The damn users have mucked up the script AGAIN and now they 
expect me to fix it for free!!!", then that's a social problem, not a 
technical one, and a social solution might save you a lot of wasted 
effort.




-- 
Steven



More information about the Python-list mailing list