Hi! I have a really long binary file that I want to read. The way I am doing it now is:
for i in xrange(N): # N is about 10,000,000 time = struct.unpack('=HHHH', infile.read(8)) # do something tdc = struct.unpack('=LiLiLiLi',self.lmf.read(32)) # do something Each loop takes about 0.2 ms in my computer, which means the whole for loop takes 2000 seconds. I would like it to run faster. Do you have any suggestions? Thank you very much. OhKyu -- http://mail.python.org/mailman/listinfo/python-list