mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-31 19:23:16 +03:00
Adding Python 3 support for StringIO
This commit is contained in:
parent
f1c245c9c5
commit
6d8ba56c44
|
@ -1,7 +1,11 @@
|
||||||
from tester import *
|
from tester import *
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import StringIO
|
try:
|
||||||
|
from io import StringIO # python 3
|
||||||
|
except ImportError:
|
||||||
|
from StringIO import StringIO # python 2
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import ImageFont
|
from PIL import ImageFont
|
||||||
ImageFont.core.getfont # check if freetype is available
|
ImageFont.core.getfont # check if freetype is available
|
||||||
|
|
Loading…
Reference in New Issue
Block a user