It's not that complicated. I actually translated a good portion of the marshal module into Python, though, I didn't finish it. Just bother Ryex about the source code, I gave it to him. When you see the analogies between the codes, you will understand how simple the C code actually is.