Update example code to work in Python 3

This commit is contained in:
David D Lowe 2019-08-21 14:18:38 +01:00 committed by GitHub
parent 8dbbf9e699
commit 8ccf84a759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ Usage
hash = "whatever-hash-you-want"
rh = Robohash(hash)
rh.assemble(roboset='any')
with open("path/to/new/file.png", "w") as f:
with open("path/to/new/file.png", "wb") as f:
rh.img.save(f, format="png")
Robosets