用如下代码实现: import struct f = open( ' filepath ' , ' rb ' ) a = f.read() f.close() c = struct.unpack( ' 256B ' ,a)