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

Yes.

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

Correct.

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

Each Python version uses a "magic", as returned by imp.get_magic(). Whenever that changes (and it will at worst change between 2.x, 2.x+1), you need to recompile the .pyc files.

If you pass it an "old" pyc file (i.e. one with an
incorrect magic), Python will silently ignore the .pyc
file, use the source, and attempt to regenerate the
.pyc file.

Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to