I'm using pcapy to scan a packet capture file. I've tried a variety of tests to end the loop at EOF, but can't seem to avoid the program terminating with a pcapy.PcapError. I've tested for empty lists (while Raw == [] or Passed == []:) and strings (while Raw ==""] or Passed == "":) as well as the test in the sample below.
while Raw and Passed : if Raw_IP != Passed_IP: Dropped.dump(Raw_hdr, Raw_data) else: Passed_hdr, Passed_data = Passed.next() Raw_hdr, Raw_data = Raw.next() -- http://mail.python.org/mailman/listinfo/python-list