<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html> <head> <meta http-equiv='Content-Type' content='text/html; charset=us-ascii' /> <title>The PIL.ContainerIO Module</title> <link rel='stylesheet' href='effbot.css' type='text/css' /> </head> <body> <h1>The PIL.ContainerIO Module</h1> <dl> <dt><b>ContainerIO(file, offset, length)</b> (class) [<a href='#PIL.ContainerIO.ContainerIO-class'>#</a>]</dt> <dd> <p>A file object that provides read access to a part of an existing file (for example a TAR file).</p> <p>For more information about this class, see <a href='#PIL.ContainerIO.ContainerIO-class'><i>The ContainerIO Class</i></a>.</p> </dd> </dl> <h2><a id='PIL.ContainerIO.ContainerIO-class' name='PIL.ContainerIO.ContainerIO-class'>The ContainerIO Class</a></h2> <dl> <dt><b>ContainerIO(file, offset, length)</b> (class) [<a href='#PIL.ContainerIO.ContainerIO-class'>#</a>]</dt> <dd> <p>A file object that provides read access to a part of an existing file (for example a TAR file).</p> </dd> <dt><a id='PIL.ContainerIO.ContainerIO.__init__-method' name='PIL.ContainerIO.ContainerIO.__init__-method'><b>__init__(file, offset, length)</b></a> [<a href='#PIL.ContainerIO.ContainerIO.__init__-method'>#</a>]</dt> <dd> <p>Create file object.</p> <dl> <dt><i>file</i></dt> <dd> Existing file.</dd> <dt><i>offset</i></dt> <dd> Start of region, in bytes.</dd> <dt><i>length</i></dt> <dd> Size of region, in bytes.</dd> </dl><br /> </dd> <dt><a id='PIL.ContainerIO.ContainerIO.isatty-method' name='PIL.ContainerIO.ContainerIO.isatty-method'><b>isatty()</b></a> [<a href='#PIL.ContainerIO.ContainerIO.isatty-method'>#</a>]</dt> <dd> <p>Always false.</p> </dd> <dt><a id='PIL.ContainerIO.ContainerIO.read-method' name='PIL.ContainerIO.ContainerIO.read-method'><b>read(bytes=0)</b></a> [<a href='#PIL.ContainerIO.ContainerIO.read-method'>#</a>]</dt> <dd> <p>Read data.</p> <dl> <dt><i>bytes</i></dt> <dd> Number of bytes to read. If omitted or zero, read until end of region.</dd> <dt>Returns:</dt> <dd> An 8-bit string.</dd> </dl><br /> </dd> <dt><a id='PIL.ContainerIO.ContainerIO.readline-method' name='PIL.ContainerIO.ContainerIO.readline-method'><b>readline()</b></a> [<a href='#PIL.ContainerIO.ContainerIO.readline-method'>#</a>]</dt> <dd> <p>Read a line of text.</p> <dl> <dt>Returns:</dt> <dd> An 8-bit string.</dd> </dl><br /> </dd> <dt><a id='PIL.ContainerIO.ContainerIO.readlines-method' name='PIL.ContainerIO.ContainerIO.readlines-method'><b>readlines()</b></a> [<a href='#PIL.ContainerIO.ContainerIO.readlines-method'>#</a>]</dt> <dd> <p>Read multiple lines of text.</p> <dl> <dt>Returns:</dt> <dd> A list of 8-bit strings.</dd> </dl><br /> </dd> <dt><a id='PIL.ContainerIO.ContainerIO.seek-method' name='PIL.ContainerIO.ContainerIO.seek-method'><b>seek(offset, mode=0)</b></a> [<a href='#PIL.ContainerIO.ContainerIO.seek-method'>#</a>]</dt> <dd> <p>Move file pointer.</p> <dl> <dt><i>offset</i></dt> <dd> Offset in bytes.</dd> <dt><i>mode</i></dt> <dd> 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.</dd> </dl><br /> </dd> <dt><a id='PIL.ContainerIO.ContainerIO.tell-method' name='PIL.ContainerIO.ContainerIO.tell-method'><b>tell()</b></a> [<a href='#PIL.ContainerIO.ContainerIO.tell-method'>#</a>]</dt> <dd> <p>Get current file pointer.</p> <dl> <dt>Returns:</dt> <dd> Offset from start of region, in bytes.</dd> </dl><br /> </dd> </dl> </body></html>