ByteOrder

class ByteOrder(byteOrderStr=None)[source]

Bases: object

“Class to hold the byte order of a binary table”

Methods Summary

fromString(byteOrderStr)

Sets this value from a string.

getByteOrder()

Returns the byte order name, which is equivalent to sys.byteorder when isNative() returns True.

isNative()

Returns true if this ByteOrder is equvialent to the native byteorder as found in sys.byteorder.

Methods Documentation

fromString(byteOrderStr)[source]

Sets this value from a string. Recognized strings are ‘Little_Endian’, ‘Big_Endian’ and ‘Native’. ‘Native’ endian sets the byte order name to be the value of sys.byteorder. ‘Little_Endian’ sets the byte order name to ‘little’ and ‘Big_Endian’ sets the byte order name to ‘big’

getByteOrder()[source]

Returns the byte order name, which is equivalent to sys.byteorder when isNative() returns True. This is the string that can be used in the byteorder field of the from_bytes methods of the native python types.

isNative()[source]

Returns true if this ByteOrder is equvialent to the native byteorder as found in sys.byteorder.