Thursday, February 2, 2012

python struct.pack

Victor's code uses this very cool-looking method struct.pack to build data into a buffer. What is up with all the fancy format charaters. It turns out that the > means BigEndian, and the H and i are unsigned short and int respectively. Here is a great reference:

http://www.python.org/doc//current/library/struct.html