开发者

Convert Intel HEX file to binary file

开发者 https://www.devze.com 2023-03-21 18:28 出处:网络
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.

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


You may be interested in the IntelHex python lib.


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'
0

精彩评论

暂无评论...
验证码 换一张
取 消