import struct def byteswap(data, sampwidth): print(data) raise ch = "I" if sampwidth == 16 else "H"