import struct import sys with open(sys.argv[1], 'rb') as f: buf = f.read() for i in range(len(buf) // 2): value, = struct.unpack('