openformat package

Submodules

openformat.util module

openformat.util.ARRAY_PATTERN = re.compile('(\\w+)\\[(\\d+(?:,\\s*\\d+)*)\\]')
openformat.util.CTYPES_FORMAT_LOOKUP = {'WORD': 'h', 'char': 's', 'double': 'd', 'int': 'i', 'short': 'h', 'str': 's', 'uint': 'I', 'ushort': 'H'}
openformat.util.LOGGER = <Logger openformat.util (WARNING)>
openformat.util.PATTERNS = [(re.compile('(\\d+)?(\\w+)'), <function _load_struct>), (re.compile('(\\w+)\\[(\\d+(?:,\\s*\\d+)*)\\]'), <function _load_array>)]
openformat.util.STRUCT_PATTERN = re.compile('(\\d+)?(\\w+)')
openformat.util.STR_PATTERN = re.compile('\\d+str')
class openformat.util.Structure

Bases: dict

Abstract base class for structures.

classmethod from_buffer(buffer, byte_order=None)

Create an instance of cls from buffer using the specified byte_order.

validate()

Validate the structure.

openformat.util.from_buffer(type_, buffer, byte_order=None)

Load data with type_ from buffer using a given byte_order.

openformat.util.skipdocs(obj)

Skip this object in the automatically generated documentation.

Module contents