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

Public Member Functions

def __init__ (self, name, mode, comptype, fileobj, bufsize)
 
def __del__ (self)
 
def write (self, s)
 
def close (self)
 
def tell (self)
 
def seek (self, pos=0)
 
def read (self, size=None)
 

Data Fields

 name
 
 mode
 
 comptype
 
 fileobj
 
 bufsize
 
 buf
 
 pos
 
 closed
 
 zlib
 
 crc
 
 dbuf
 
 cmp
 

Detailed Description

Class that serves as an adapter between TarFile and
   a stream-like object.  The stream-like object only
   needs to have a read() or write() method and is accessed
   blockwise.  Use of gzip or bzip2 compression is possible.
   A stream-like object could be for example: sys.stdin,
   sys.stdout, a socket, a tape device etc.

   _Stream is intended to be used only internally.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name,
  mode,
  comptype,
  fileobj,
  bufsize 
)
Construct a _Stream object.

◆ __del__()

def __del__ (   self)

Member Function Documentation

◆ close()

def close (   self)
Close the _Stream object. No operation should be
   done on it afterwards.

◆ read()

def read (   self,
  size = None 
)
Return the next size number of bytes from the stream.
   If size is not defined, return all bytes of the stream
   up to EOF.

◆ seek()

def seek (   self,
  pos = 0 
)
Set the stream's file pointer to pos. Negative seeking
   is forbidden.

◆ tell()

def tell (   self)
Return the stream's file pointer position.

◆ write()

def write (   self,
  s 
)
Write string s to the stream.

Field Documentation

◆ buf

buf

◆ bufsize

bufsize

◆ closed

closed

◆ cmp

cmp

◆ comptype

comptype

◆ crc

crc

◆ dbuf

dbuf

◆ fileobj

fileobj

◆ mode

mode

◆ name

name

◆ pos

pos

◆ zlib

zlib

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