[Pythonmac-SIG] Is Python bytecode cross-platform?
mlist at unicornwest.org
Tue Mar 9 23:24:34 EST 2004
Indeed, Thank you very much for this information.
Further investigation into my difficulties revealed that I was
generating byte code in python 2.3 on my mac and attempting to run it
using python 2.2 on Solaris. It did not work.
After some experimentation, I found that 2.2 bytecode does run on other
platforms running python 2.2
On a side note
Code distribution seems to be meagerly documented, or more likely I
just haven't found a the right place to read about it yet.
I am curious how one distributes python applications without
distributing the source.
On Mar 8, 2004, at 7:01 AM, Michael Hudson wrote:
> Bob Ippolito <bob at redivi.com> writes:
>> On Mar 6, 2004, at 1:12 AM, Mailing List wrote:
>>> Should a pyc file created on my Panther Mac run on other platforms?
>>> My initial observations are that it won't, is this correct or am I
>>> just doing something wrong?
>> pyc files are definitely specific to the version of Python that
>> produced them, though I believe that the bytecodes don't change very
>> often (at all?) between minor releases.
> Bytecode from 2.Y.Z is compatible with bytecode from 2.Y.W. This has
> sometimes been painful to acheive, but it's a serious goal.
> Bytecode from 2.Y is NOT compatible with bytecode 2.Z. We don't try
> to make it incompatible, but we always seem to find some reason to do
> it :-)
>> I don't believe that the platform is a factor.
> It isn't. marshal goes to some pain to be platform independent.
> ZAPHOD: You know what I'm thinking?
> FORD: No.
> ZAPHOD: Neither do I. Frightening isn't it?
> -- The Hitch-Hikers Guide to the Galaxy, Episode 11
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
More information about the Pythonmac-SIG