Module tarfile :: Class ExFileObject
[hide private]
[frames] | no frames]

type ExFileObject

object --+

File-like object for reading an archive member. Is returned by TarFile.extractfile(). Support for sparse files included.

Instance Methods [hide private]
__init__(self, tarfile, tarinfo)
__read(self, size)
Overloadable read method.
readline(self, size=-1)
Read a line with approx.
Return a list with all (following) lines.
_readnormal(self, size=None)
Read operation for regular files.
_readsparse(self, size=None)
Read operation for sparse files.
_readsparsesection(self, size)
Read a single section of a sparse file.
Return the current file position.
seek(self, pos, whence=0)
Seek to a position in the file.
Close the file object.
Get an iterator over the file object.
Get the next item from the file iterator.
Method Details [hide private]

__init__(self, tarfile, tarinfo)

Overrides: object.__init__
(inherited documentation)

readline(self, size=-1)


Read a line with approx. size. If size is negative, read a whole line. readline() and read() must not be mixed up (!).