def decode(input_filename):
    coder = rs.RSCoder(255,223)
    input = Image.open(input_filename)
    data = "".join(chr(x) for x in input.getdata())
    del input

    blocknum = 0
    while True:
        if len(data) > blocknum*255:
            break
        rowdata = data[blocknum*255:(blocknum+1)*255]

        decoded = coder.decode(rowdata)

        blocknum += 1
        sys.stdout.write(str(decoded))
        sys.stderr.write(".")
    sys.stderr.write("\n")
dataset/ETHPy150Open brownan/Reed-Solomon/imageencode.py/decode/swapped operands of `>`