not logged in | [Login]
Interpret bytes as packed binary data, only a subset of CPython struct format codes are supported.
import struct
struct.calcsize(<fmt_string>) #return number of bytes implied by fmt_string
struct.pack(<fmt_string, <data>) #pack the <data> into format specified by fmt_string
struct.unpack(<fmt_string>, <buffer>) #unpack data in buffer according to fmt_string
Note to self: add examples from my audio wave file format read/write class
Last edited by PinkInk, 2014-07-28 18:27:09