gstlal-inspiral  1.9.2
 All Classes Namespaces Files Functions
Public Member Functions | List of all members
hoftcache.tempcache Class Reference
Inheritance diagram for hoftcache.tempcache:
[legend]
Collaboration diagram for hoftcache.tempcache:
[legend]

Public Member Functions

def __delitem__
 
def __delslice__
 
def __del__
 

Detailed Description

List-like object to hold CacheEntry objects, and run os.unlink() on
the .path of each as they are removed from the list or when the
list is garbage collected.  All errors during file removal are
ignored.

Note that there is no way to remove a CacheEntry from this list
without the file it represents being deleted.  If, after adding a
CacheEntry to this list it is decided the file must not be deleted,
then instead of removing it from the list it must be replaced with
something else, e.g. None, and that item can then be removed from
the list.

Example:

>>> from lal.utils import CacheEntry
>>> # create a cache, and add an entry
>>> cache = tempcache()
>>> cache.append(CacheEntry("- - - - file://localhost/tmp/blah.txt"))
>>> # now remove it without the file being deleted
>>> cache[-1] = None
>>> del cache[-1]

Definition at line 57 of file hoftcache.py.


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