
February 26th, 2004, 03:03 AM
|
 |
Mini me.
|
|
Join Date: Nov 2003
Location: Cambridge, UK
|
|
When you run the "program.py" file Python automatically
compiles the text to bytecode and store it in memory. It is the bytecode that is actually run by Python. If your program imports another file then this file is also converted to bytecode but the bytecode is stored in .pyc files.
Bytecode is like a halfway house between plain text and real machine code.
To make a stand alone program .exe file you need other tools like py2exe and installer. But these are only needed if you plan to send your program to friends who do not have Python installed  Even these .exe programs still run the bytecode! It is just that they bundle Python and the bytecode into one big file.
Cheers,
Grim
Last edited by Grim Archon : February 26th, 2004 at 05:52 AM.
Reason: removed stupid error!
|