Python Question About Compiling.

Tim Roberts timr at probo.com
Thu Nov 30 03:21:34 EST 2006


"Scheol Service" <scheols at gmail.com> wrote:
>
>Im just unsure on how to compile python code into .exe executionable
>files.  Is there a simple way to do this?

Sort of.  Python code is not compiled to machine language.  Instead, it is
compiled to an intermediate language that is then interpreted.  That means
that, at run-time, there must be an interpreter available.

However, there are several packages that will gather up a copy of the
interpreter, your script, and whatever scripts and libraries it might need,
and pack them all into a .exe.  To the end user, it looks like a compiled
program.  py2exe is one example.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list