[Tutor] interpreted or compiled?

Alan Gauld alan.gauld at btinternet.com
Wed Sep 12 20:01:41 CEST 2007

"Michael" <python at mrfab.info> wrote

> As a new Python user I was curious if you can run Python without the
> environment, ie make it an executable?

There are two separate issues here.

First: Can you make executable Python scripts?
Yes, see Sam's response re py2exe etc

Second: Can you run Python without the environment? No.
py2exe and the other installers simply bundle up the interpreter and
other modules you need into a single executable file. The environment
is still present.

This is somewhat analagous to a C/C++ program which is compiled.
You can either link the libraries it needs statically or dynamically.
If you do it statically you don't need those DLLs on the host PC
but the file is much bigger, but if you do it dynamically the 
need to be installed as well as the basic exe. Same with py2exe,
the basic text files might only be a few kilobytes but the combined
exe will be 5-10 Megabytes typically.


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list