hexrec.records.find_record_type_name#

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

Finds the record type name.

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

Parameters:

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

Returns:

str – Record type name.

Raises:

KeyError – Unsupported extension.

Example

>>> from hexrec.records import find_record_type_name
>>> find_record_type_name('dummy.mot')
'motorola'