随笔分类 - python
摘要:读取嵌套和可变长的二进制数据 python import struct import itertools polys = [ [(1.0, 2.5), (3.5, 4.0), (2.5, 1.5)], [(7.0, 1.2), (5.1, 3.0), (0.5, 7.5), (0.8, 9.0)],
阅读全文
摘要:读写二进制数组数据 python from struct import Struct def write_records(records, format, f): record_struct = Struct(format) for r in records: f.write(record_stru
阅读全文

浙公网安备 33010602011771号