xdrlib.Unpacker.unpack_list()

Unpacker.unpack_list(unpack_item) Unpacks and returns a list of homogeneous items. The list is unpacked one element at a time by first unpacking an unsigned integer flag. If the flag is 1, then the item is unpacked and appended to the list. A flag of 0 indicates the end of the list. unpack_item is the function that is called to unpack the items.

xdrlib.Unpacker.unpack_fstring()

Unpacker.unpack_fstring(n) Unpacks and returns a fixed length string. n is the number of characters expected. Padding with null bytes to guaranteed 4 byte alignment is assumed.

xdrlib.Unpacker.unpack_double()

Unpacker.unpack_double() Unpacks a double-precision floating point number, similarly to unpack_float().

xdrlib.Unpacker.unpack_farray()

Unpacker.unpack_farray(n, unpack_item) Unpacks and returns (as a list) a fixed length array of homogeneous items. n is number of list elements to expect in the buffer. As above, unpack_item is the function used to unpack each element.

xdrlib.Unpacker.unpack_bytes()

Unpacker.unpack_bytes() Unpacks and returns a variable length byte stream, similarly to unpack_string().

xdrlib.Unpacker.set_position()

Unpacker.set_position(position) Sets the data buffer unpack position to position. You should be careful about using get_position() and set_position().

xdrlib.Unpacker.done()

Unpacker.done() Indicates unpack completion. Raises an Error exception if all of the data has not been unpacked.

xdrlib.Unpacker.reset()

Unpacker.reset(data) Resets the string buffer with the given data.

xdrlib.Unpacker.get_position()

Unpacker.get_position() Returns the current unpack position in the data buffer.

xdrlib.Unpacker

class xdrlib.Unpacker(data) Unpacker is the complementary class which unpacks XDR data values from a string buffer. The input buffer is given as data.