On 6/18/2015 5:39 AM, Jean-Michel Pichavant wrote:

I'm currently writing python code that writes a small binary file to
be used by another device which code is written in C. The python code
runs on a little endian CPU, and unfortunately, the other device is
using a big endian MIPS.

The struct module is designed for this. It reads and writes packed binary data of various types and sizes in either big or little endian order. It should be easier than ctypes.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to