







The PIL.ContainerIO Module


ContainerIO(file, offset, length) (class) [ #PIL.ContainerIO.ContainerIO-class# ]

A file object that provides read access to a part of an existing
file (for example a TAR file).

For more information about this class, see #PIL.ContainerIO.ContainerIO-classThe ContainerIO Class .



The ContainerIO Class 


ContainerIO(file, offset, length) (class) [ #PIL.ContainerIO.ContainerIO-class# ]

A file object that provides read access to a part of an existing
file (for example a TAR file).


__init__(file, offset, length)  [ #PIL.ContainerIO.ContainerIO.__init__-method# ]

Create file object.


file

Existing file.

offset

Start of region, in bytes.

length

Size of region, in bytes.



isatty()  [ #PIL.ContainerIO.ContainerIO.isatty-method# ]

Always false.


read(bytes=0)  [ #PIL.ContainerIO.ContainerIO.read-method# ]

Read data.


bytes

Number of bytes to read.  If omitted or zero,
    read until end of region.

Returns:

An 8-bit string.



readline()  [ #PIL.ContainerIO.ContainerIO.readline-method# ]

Read a line of text.


Returns:

An 8-bit string.



readlines()  [ #PIL.ContainerIO.ContainerIO.readlines-method# ]

Read multiple lines of text.


Returns:

A list of 8-bit strings.



seek(offset, mode=0)  [ #PIL.ContainerIO.ContainerIO.seek-method# ]

Move file pointer.


offset

Offset in bytes.

mode

Starting position. Use 0 for beginning of region, 1
   for current offset, and 2 for end of region.  You cannot move
   the pointer outside the defined region.



tell()  [ #PIL.ContainerIO.ContainerIO.tell-method# ]

Get current file pointer.


Returns:

Offset from start of region, in bytes.





