is there a Python compiler?

Jochen Skulj jochen at
Thu Mar 16 20:32:02 UTC 2006


Norton Roman wrote:
> Actually, it interpretes the code (.py files). However, it also
> generates a bytecode (.pyc files) to run on its virtual machine, in the
> case you don't change the original source file. This way, it runs faster
> code that you did not change.

Thanks for this information. I have a couple of Python scripts which I
use from more or less often. They are all located in the same directory
but I noticed there are only .pyc files for some of the scripts (for
those I wrote and used long time ago under Debian). There are no .pyc
files for my newer script. So I thought there may be a special program
or parameter to create those pyc files. But until now I haven't found
anything like that. Can you tell me why there are pyc files for some
scripts and why other scripts haven't pyc files?

It's not a big issue at all; I'm just curious how it works.

Cheers, Jochen
Jochen Skulj
GPG Key-ID: 0x37B2F0B8
Finger Print: F239 5D8D 97CD F91F 9D08  AE94 AA3B 1ED5 37B2 F0B8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the ubuntu-users mailing list