OpenQuizz
Une application de gestion des contenus pédagogiques
ExFileObject Class Reference
Inheritance diagram for ExFileObject:
Collaboration diagram for ExFileObject:

Public Member Functions

def __init__ (self, tarfile, tarinfo)
 
def readable (self)
 
def writable (self)
 
def seekable (self)
 
def read (self, size=None)
 
def readline (self, size=-1)
 
def readlines (self)
 
def tell (self)
 
def seek (self, pos, whence=os.SEEK_SET)
 
def close (self)
 
def __iter__ (self)
 

Data Fields

 fileobj
 
 name
 
 mode
 
 closed
 
 size
 
 position
 
 buffer
 

Static Public Attributes

 blocksize
 
 read1
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  tarfile,
  tarinfo 
)

Member Function Documentation

◆ __iter__()

def __iter__ (   self)
Get an iterator over the file's lines.

◆ close()

def close (   self)
Close the file object.

◆ read()

def read (   self,
  size = None 
)
Read at most size bytes from the file. If size is not
   present or None, read all data until EOF is reached.

◆ readable()

def readable (   self)

◆ readline()

def readline (   self,
  size = -1 
)
Read one entire line from the file. If size is present
   and non-negative, return a string with at most that
   size, which may be an incomplete line.

◆ readlines()

def readlines (   self)
Return a list with all remaining lines.

◆ seek()

def seek (   self,
  pos,
  whence = os.SEEK_SET 
)
Seek to a position in the file.

◆ seekable()

def seekable (   self)

◆ tell()

def tell (   self)
Return the current file position.

◆ writable()

def writable (   self)

Field Documentation

◆ blocksize

blocksize
static

◆ buffer

buffer

◆ closed

closed

◆ fileobj

fileobj

◆ mode

mode

◆ name

name

◆ position

position

◆ read1

read1
static

◆ size

size

The documentation for this class was generated from the following file: