/usr/lib/python3/dist-packages/PIL/ImageFileIO.py is in python3-pil 2.3.0-1ubuntu3.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #
# The Python Imaging Library.
# $Id$
#
# kludge to get basic ImageFileIO functionality
#
# History:
# 1998-08-06 fl Recreated
#
# Copyright (c) Secret Labs AB 1998-2002.
#
# See the README file for information on usage and redistribution.
#
"""
The **ImageFileIO** module can be used to read an image from a
socket, or any other stream device.
Deprecated. New code should use the :class:`PIL.ImageFile.Parser`
class in the :mod:`PIL.ImageFile` module instead.
.. seealso:: modules :class:`PIL.ImageFile.Parser`
"""
from io import BytesIO
class ImageFileIO(BytesIO):
def __init__(self, fp):
"""
Adds buffering to a stream file object, in order to
provide **seek** and **tell** methods required
by the :func:`PIL.Image.Image.open` method. The stream object must
implement **read** and **close** methods.
:param fp: Stream file handle.
.. seealso:: modules :func:`PIL.Image.open`
"""
data = fp.read()
BytesIO.__init__(self, data)
|