On Feb 24, 9:39 am, Toby <[EMAIL PROTECTED]> wrote:
> As part of a program I'm writing, I need to save to disk big amounts of
> data (hundreds of MB, in 8kB chunks) swapping every couple of bytes.
>
> I obviously cannot do it in a Python loop.
>
> Is there a function I could use in the standard library, or do I have to
> write my own C extension?

Try the using the array module.  array objects provide a byteswap
method which reverses endianness.

-Daniel

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

Reply via email to