A few q's on python files.

Tim Roberts timr at probo.com
Wed Feb 23 02:25:36 EST 2005


Joseph Quigley <cpu.crazy at gmail.com> wrote:
>
>i'm new to python (by a week) but am learning fast (that's what I like 
>about python--it's simplicity). I got disgusted with C and C++ (i was 
>learning) probably because of a bad copy of Visual C++ 6.0 that gave me errors.

I find that very hard to believe.

>I noticed that IDLE doesn't have an option to allow you to convert a .py or 
>pyc. file into an executable. Why? Am i wrong? Where can I find one (if I'm 
>right)?

Like VB6 and Perl, Python is interpreted, not compiled.  You don't compile
it into an .exe.  You pass the script to the python.exe interpreter, where
it is executed.

There are packages (like py2exe) that can convert your script into an
executable, but they are essentially installers.  They package your script,
and all the scripts and libraries it needs, into a single file along with
the interpreter.  When the .exe is executed, it extracts the interpreter
and the scripts into a temp directory, and fires up the interpreter.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list