writing binary file for different platform
Martin v. Löwis
loewis at informatik.hu-berlin.de
Sat May 11 03:29:33 EDT 2002
Erno Kuusela <erno-news at erno.iki.fi> writes:
> with luck, the endianness character could make it work. but
> different platforms have different data type sizes, different
> floating point number formats and different alignment rules.
> so generally, you cannot do it with the struct module.
>
> you will therefore probably need to use a platform independent
> format for transferring data between your programs, such as text.
A binary format could also be platform-independent, you just need to
specify it precisely. Following the format that the AIX program
produces is as good as any other solution - you only need to
understand what the format is that it produces.
Regards,
Martin
More information about the Python-list
mailing list