hexrec.records.get_data_records#
- hexrec.records.get_data_records(records)[source]#
Extracts data records.
- Parameters:
records (list of records) – Sequence of records.
- Returns:
list of records – Sequence of data records.
Example
>>> from hexrec.utils import chop_blocks >>> from hexrec.formats.motorola import Record as MotorolaRecord >>> data = bytes(range(256)) >>> blocks = list(chop_blocks(data, 16)) >>> records = blocks_to_records(blocks, MotorolaRecord) >>> all(r.is_data() for r in get_data_records(records)) True