Reputation: 3157
I have a Intel HEX file and I want to have a binary file. How, in python ?
I think use the binascii module but I don't know what function is the most appropriate. Thanks
Upvotes: 6
Views: 9149
Reputation: 20992
If you have a string of hex, you can decode it using the decode
method. For instance,
>>> s = '0001020304'
>>> s.decode('hex')
'\x00\x01\x02\x03'
Upvotes: -1