hexrec.records.find_record_type#

hexrec.records.find_record_type(file_path)[source]#

Finds the record type class.

Checks if the extension of file_path is a know record type, and returns its mapped type class.

Parameters:

file_path (str) – File path to get the file extension from.

Returns:

str – Record type class.

Raises:

KeyError – Unsupported extension.

Example

>>> from hexrec.records import find_record_type_name
>>> find_record_type('dummy.mot').__name__
'MotorolaRecord'