[Pythonmac-SIG] Is Python bytecode cross-platform?

Bob Ippolito bob at redivi.com
Wed Mar 10 03:36:18 EST 2004


You distribute a copy of the Python runtime as well.

On Mar 10, 2004, at 5:24 AM, Matthew Wingren wrote:

> 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.
>>
>> Cheers,
>> mwh
>>
>> -- 
>>   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
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>
>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040310/a919ba13/smime.bin


More information about the Pythonmac-SIG mailing list