Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
fix examples in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
combs committed May 19, 2020
1 parent 0245f65 commit e1a01a4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ c = Claptcha("Text", "FreeMono.ttf")
# Get PIL Image object
text, image = c.image

print(text)) # 'Text'
print(type(image))) # <class 'PIL.Image.Image'>
print(text) # 'Text'
print(type(image)) # <class 'PIL.Image.Image'>

# Get BytesIO object (note that it will represent a different image, just
# with the same text)
text, bytes = c.bytes

print(text)) # 'Text'
print(type(bytes))) # <class '_io.BytesIO'>
print(text) # 'Text'
print(type(bytes)) # <class '_io.BytesIO'>

# Save a PNG file 'test.png'
text, file = c.write('test.png')

print(text)) # 'Text'
print(file)) # 'test.png'
print(text) # 'Text'
print(file) # 'test.png'
```

```python
Expand All @@ -55,7 +55,7 @@ from PIL import Image
from claptcha import Claptcha

def randomString():
rndLetters = (random.choice(string.ascii_uppercase) for _ in range(6))
rndLetters = (random.choice(string.ascii_uppercase) for _ in range(6)
return "".join(rndLetters)

# Initialize Claptcha object with random text, FreeMono as font, of size
Expand Down

0 comments on commit e1a01a4

Please sign in to comment.