compatbility of .pyc files

Blair Hall b.hall at irl.cri.nz
Tue Feb 22 19:31:12 EST 2005


I have a requirement to prevent 'accidental' tampering
with some software written in Python. If I ensure that all
of the modules concerned are compiled into .pyc's, and remove
the .py's to another location, then I should be safe until
the next upgrade of the Python interpretter.

My questions:

Are the .pyc's usable without recompilation between 'minor'
releases of the interpretter (e.g., 2.3.1 -> 2.3.2 -> etc)?

I presume that the .pyc's are NOT compatible
across more major releases (e.g., 2.3.x -> 2.4.x)?

Is there a hard and fast rule about compatibility across
releases that I can rely on?




More information about the Python-list mailing list