摘要:
python struct模块主要内容来自转自:http://blog.163.com/sywxf@126/blog/static/50671196201011319507710/简单读一个二进制文件:# coding: utf-8import structimport sysbinfile=open('test.bin','rb')buf = binfile.read()unpackIndex = 0a,b,c,d = struct.unpack_from('ifdh', buf, unpackIndex)print a, b, c, dunp 阅读全文