precompiled scripts?

David LeBlanc whisper at oz.nospamnet
Sat May 12 18:40:20 EDT 2001


In article <Pine.GSO.4.20.0105102103140.18611-100000 at amor>, 
h0444nid at rz.hu-berlin.de says...
> hi,
> i need to write an applet but don't want the source to be visible. so i
> need to know, wether it is possible to use a kind of precompiled binary of
> a python script or not. i know, that it is possible with perl an tcl/tk,
> but i'd better like to use python because of its graphical functions.
> 
> thanx,
> 
> ben
> 
> p.s.: please reply also per pm to:
>   dietze at freepage.de
> 
> 
Tcl/Tk doesn't offer a true byte code on disk capability like perl and 
python do. There are several "wrap" programs which bundle up the 
.tcl scripts along with a tcl interpreter, but the scripts can be got at 
pretty easily. Tcl-Pro added script obfustication to the scripts to make 
it harder, but it's not that hard to clarify the scripts again.

Perl does have what is described as a true compiler, but it's been at 
"experimental" status since the camel lost a hump. (I only look over
 Perl's fence from time to time, so things might have changed.)

Python's "freezers" do the same thing that Tcl/Tk does: wraps an execute 
shell around a python interpreter and the byte codes of the .py files.

When all is said and done, there is no such thing as total security, 
either in life or in computer programming: with enough motivation, people 
turn machine code back into assembly language and ultimately back to 
C/C++. (I have a friend who does that for a living.) With that in mind, 
Python's "freezers" are probably adequate security if you're selling to a 
relatively unsophisticated market and/or there's nothing especially 
proprietary about what you offer.

Dave LeBlanc



More information about the Python-list mailing list