hexrec.records.load_records#
- hexrec.records.load_records(path, record_type=None)[source]#
Loads records from a record file.
- Parameters:
path (str) – Path of the input file.
record_type (type) – Explicit record type. If
None
, it is guessed from the file extension.
Example
>>> from hexrec.formats.motorola import Record as MotorolaRecord >>> records = list(MotorolaRecord.split(bytes(range(256)))) >>> save_records('bytes.mot', records) >>> load_records('bytes.mot') == records True