The lzma module ran into a similar issue with 32-bit unsigned ints. I worked around it by writing a custom converter function to use with the "O&" code. You can find the converter definition here: http://hg.python.org/cpython/file/default/Modules/_lzmamodule.c#l134 And an example usage here: http://hg.python.org/cpython/file/default/Modules/_lzmamodule.c#l261 Cheers, Nadeem