pyc files on 2.0 and 2.1 compatible?

David Bolen db3l at fitlinxx.com
Wed Sep 26 16:54:16 EDT 2001


ransen_spam_me_not at nemo.it (Owen F. Ransen) writes:

> Are compiled Python files compatible between version?
> Upwards? Backwards? 

In general, no.  (I don't know if there was ever a version change at
the minor level that remained compatible, but you can't depend on it).

> I get a "magic number error"...

Right - that's the stamp Python puts at the top of the file when it
compiles it to uniquely identify the binary format.  If you get this
error then you're definitely using an incompatible compiled file.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list