pyc

Compilers targeting .pyc files?

Out of curiosity, are there many compilers out there which target .pyc files? After a bit of Googling, the only two I can find are: unholy: why_'s Ruby-to-pyc compiler Python: The PSF's Python to pyc compiler So… Are there any more? (as a side note, I got thinking about this because I want to write a Scheme-to-pyc compiler) (as a ...

How to import *.pyc file from different version of python?

Hello, I used python 2.5 and imported a file named "irit.py" from C:\util\Python25\Lib\site-packages directory. This files imports the file "_irit.pyc which is in the same directory. It worked well and did what I wanted. Than, I tried the same thing with python version 2.6.4. "irit.py" which is in C:\util\Python26\Lib\site-packages was i...

If Python is interpreted, what are .pyc files?

I've been given to understand that Python is an interpreted language... however, when I look at my Python source code I see .pyc files, which Windows identifies as "Compiled Python Files". Where do these come in? ...

Find what is in a PYC file

This may be a noobie questions, but... So I have a pyc file that I need to use, but I don't have any documentation on it. Is there a way to find out what classes and functions are in it and what variables they take? I don't need to code, just how to run it. Thanks ...

Make Python ignore .pyc files

Is there a way to make Python ignore any .pyc files that are present and always interpret all the code (including imported modules) directly? Google hasn't turned up any answers, so I suspect not, but it seemed worth asking just in case. (Why do I want to do this? I have a large pipeline of Python scripts which are run repeatedly over ...

Changing the directory where .pyc files are created

Is there a way to change the directory where .pyc file are created by python interpreter ? I saw two PEPs about that subject (0304 and 3147), but none seems to be implemented in the default interpreter (I'm working with python3). Did I miss something ? Thanks ! ...

Are pyc files independent of the interpreter architecture?

From the tests I've done, with the same version of python (same magic number), a 64 bit interpreter can load pyc files made with a 32 bit version of python. And reciprocally I assume. But is it totally safe? Can this lead to unexpected behavior? ...

Are pyc files independent of the minor version of python?

Is it possible and safe to load pyc files made with a different minor version of python? For instance 2.5.1 with 2.5.5? My guess is that the magic number does not change with minor versions. If I refer to this file import.c the magic number corresponds to the variable pyc_magic ( equals MAGIC or MAGIC+1 ) The file comments say: Mag...