binascii.unhexlify:
>>> import binascii>>> binascii.unhexlify('9f')'x9f'>>> hex(int('9f', 16))'0x9f'
import binasciiwith open('hexFile.txt') as f, open('test', 'wb') as fout: for line in f: fout.write( binascii.unhexlify(''.join(line.split())) )
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)