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

Public Member Functions

def __init__ (self, fp, callback)
 
def __getattr__ (self, name)
 
def read (self, amt=None)
 

Detailed Description

Small wrapper around a fp object which will tee everything read into a
buffer, and when that file is closed it will execute a callback with the
contents of that buffer.

All attributes are proxied to the underlying file object.

This class uses members with a double underscore (__) leading prefix so as
not to accidentally shadow an attribute.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  fp,
  callback 
)

Member Function Documentation

◆ __getattr__()

def __getattr__ (   self,
  name 
)

◆ read()

def read (   self,
  amt = None 
)

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