目前我这样做:
eventList = ConstBitStream(filename = 'events.dat') for i in range(1000) : packet = eventList.read(24)
(这里我必须预先计算事件的数量)
try: while True: packet = eventList.read(24) except ReadError: pass