Lines Matching full:pack
55 .. function:: pack(format, v1, v2, ...)
64 Pack the values *v1*, *v2*, ... according to the format string *format* and
71 Unpack from the buffer *buffer* (presumably packed by ``pack(format, ...)``)
101 ``pack(format, ...)``) corresponding to the format string *format*.
268 When attempting to pack a non-integer using any of the integer conversion
312 :func:`pack` is too long (longer than the count minus 1), only the leading
368 Pack and unpack integers of three different sizes, using big endian
372 >>> pack(">bhl", 1, 2, 3)
379 Attempt to pack an integer which is too large for the defined field::
381 >>> pack(">h", 99999)
389 >>> pack("@ccc", b'1', b'2', b'3')
391 >>> pack("@3s", b'123')
409 the first ``pack`` call below that three NUL bytes were added after the
413 >>> pack('@ci', b'#', 0x12131415)
415 >>> pack('@ic', 0x12131415, b'#')
425 >>> pack('@llh0l', 1, 2, 3)
508 >>> pack('<qh6xq', 1, 2, 3) == pack('@lhl', 1, 2, 3)
512 >>> pack('@llh', 1, 2, 3) == pack('<qqh', 1, 2, 3)
518 >>> pack('@llh0l', 1, 2, 3) == pack('<qqh6x', 1, 2, 3)
529 >>> pack('@llh0l', 1, 2, 3) == pack('<qqh6x', 1, 2, 3)
557 .. method:: pack(v1, v2, ...)
559 Identical to the :func:`pack` function, using the compiled format.
598 by the :meth:`pack` method) corresponding to :attr:`format`.