In Python 3 r.write() returns the number of characters written.
Attach a file by drag & drop or click to upload