import struct
with open(file_name_dir, 'wb')as fp:
for x in data_pack:
a = struct.pack('i', int(x))
fp.write(a)
fp.close()
pack的格式:
import struct
with open(file_name_dir, 'wb')as fp:
for x in data_pack:
a = struct.pack('i', int(x))
fp.write(a)
fp.close()
pack的格式: