Does python always need to compile ENTIRE program before it can start to run it???

KefX keflimarcusx at aol.comNOSPAM
Mon Nov 3 20:15:51 CET 2003


>I can achieve something similar to Python's automatic compilation
>in C/C++ by making a script that compiles and runs my program like this:
>
>
>make ; myprogram
>
>
>I am trying to think of an advantage Python has over this hack....
>
>Is it true that unlike C/C++ that Python programs can start executing
>before compilation is COMPLETELY done???  I think so but I'm not sure.
>
>Chris

Python compiles to bytecode rather than native code, so I'm not sure this
analogy really applies...also modules are only compiled when imported; if you
execute a script directly, a .pyc file will not be emitted, but it will still
be compiled in RAM.

- Kef





More information about the Python-list mailing list