import struct import sys out = open(sys.argv[2], 'w') sum = 0 with open(sys.argv[1], 'rb') as f: buf = f.read() data = struct.unpack('