D-Man <[EMAIL PROTECTED]> writes:
> Are .pyc's incompatible across versions or did the bytecode spec
> remain the same?

According to the NEWS file for Python 2.0, bytecode files are not
compatible between releases.  You can verify this by using both python
1.5 and 2.0 to import the same .py file and note that each one will
recompile the .pyc if the other one was the last to touch it.

> (Does anyone know where the bytecode format is documented?  I am
> interested in understanding how bytecode works and is designed.)

As far as I know it's only documented in the source.  The standard
module "dis.py" might be useful to look at as well (it's a bytecode
disassembler).

--Rob

-- 
Rob Tillotson  N9MTB  <[EMAIL PROTECTED]>


Reply via email to