Need information om Python byte-code

Greg Ewing greg.ewing at compaq.com
Wed Dec 15 09:14:22 EST 1999


Nick Maxwell wrote:
> 
> If someone could just tell me the exact
> steps to compiling a module into byte-code, I would really appreciate it!

You don't have to do anything -- it happens automatically.
Whenever a module is imported for the first time, it is
compiled into bytecode which is saved in a .pyc file. Next
time, if the .pyc file is newer than the .py source file,
the bytecode is simply loaded out of the .pyc file.

Greg



More information about the Python-list mailing list