byte code generated under linux ==> bad magic number underwindows

Fredrik Lundh fredrik at pythonware.com
Mon Dec 6 11:25:57 EST 2004


Aaron Bingham wrote:

> .pyc files are platform-independant but are incompatible between major Python versions.

"are incompatible" should be "may be incompatible"

you can use imp.get_magic() to get a string that identifies the bytecode version
supported by the current interpreter; any interpreter with the same string can run
your bytecode.

</F> 






More information about the Python-list mailing list