From fe1cf8e9c11053b728d276a974a5fe6955e14f56 Mon Sep 17 00:00:00 2001 From: jiaozhh Date: Sat, 12 Nov 2016 19:36:30 +0800 Subject: [PATCH] Change to io module --- docs/handbook/tutorial.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/handbook/tutorial.rst b/docs/handbook/tutorial.rst index 6b4add945..80766a5ad 100644 --- a/docs/handbook/tutorial.rst +++ b/docs/handbook/tutorial.rst @@ -484,9 +484,9 @@ Reading from a string :: - import StringIO + import io - im = Image.open(StringIO.StringIO(buffer)) + im = Image.open(io.StringIO(buffer)) Note that the library rewinds the file (using ``seek(0)``) before reading the image header. In addition, seek will also be used when the image data is read