Merge pull request #34 from Flimm/patch-1

Update example code to work in Python 3
This commit is contained in:
Colin Davis 2019-08-28 11:35:25 -04:00 committed by GitHub
commit 737fbd3d1f
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" hash = "whatever-hash-you-want"
rh = Robohash(hash) rh = Robohash(hash)
rh.assemble(roboset='any') 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") rh.img.save(f, format="png")
Robosets Robosets