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

Public Member Functions

def __init__ (self, environment, key, checksum)
 
def reset (self)
 
def load_bytecode (self, f)
 
def write_bytecode (self, f)
 
def bytecode_from_string (self, string)
 
def bytecode_to_string (self)
 

Data Fields

 environment
 
 key
 
 checksum
 
 code
 

Detailed Description

Buckets are used to store the bytecode for one template.  It's created
and initialized by the bytecode cache and passed to the loading functions.

The buckets get an internal checksum from the cache assigned and use this
to automatically reject outdated cache material.  Individual bytecode
cache subclasses don't have to care about cache invalidation.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  environment,
  key,
  checksum 
)

Member Function Documentation

◆ bytecode_from_string()

def bytecode_from_string (   self,
  string 
)
Load bytecode from a string.

◆ bytecode_to_string()

def bytecode_to_string (   self)
Return the bytecode as string.

◆ load_bytecode()

def load_bytecode (   self,
  f 
)
Loads bytecode from a file or file like object.

◆ reset()

def reset (   self)
Resets the bucket (unloads the bytecode).

◆ write_bytecode()

def write_bytecode (   self,
  f 
)
Dump the bytecode into the file or file like object passed.

Field Documentation

◆ checksum

checksum

◆ code

code

◆ environment

environment

◆ key

key

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