py vs pyc

Tomasz Lisowski list at
Mon Jan 9 04:23:09 EST 2006

Sakcee wrote:
> Hi
> I want to know that is .pyc files execute faster than .py files,? since
> both are interpreted by python  , is there any speedup in using one or
> other.?
> e.g.
> what is the difference between runing from cmd  "python" and
> "python test.pyc"
> thanks
When running "python" the interpreter will first precompile the source file, and then execute it. When running "python 
test.pyc", the interpreter will go straight to the execution of the script.


More information about the Python-list mailing list