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? Toby