Convert Intel HEX file to binary

I have an Intel HEX file and I want to have a binary file. How in python?

I think using binascii module , but I do not know which function is the most suitable. Thanks

+5
source share
2 answers

You might be interested in the IntelHex python library .

+7
source

If you have a hex string, you can decode it with a method decode. For instance,

>>> s = '0001020304'
>>> s.decode('hex')
'\x00\x01\x02\x03'
+1
source

All Articles