Write a binary integer or string to a file in python,"f.write(struct.pack('i', value))"