hexrec.utils.unhexlify#

hexrec.utils.unhexlify(hexstr)[source]#

Converts a hexadecimal text line into bytes.

Parameters:

hexstr (str) – A hexadecimal text line. Whitespace is removed, and the resulting total length must be a multiple of 2.

Returns:

bytes – Text converted into byte data.

Example

>>> unhexlify('48656C6C 6F2C2057 6F726C64 21')
b'Hello, World!'