gstlal-inspiral  0.4.2
 All Classes Namespaces Files Functions Variables Pages
List of all members | Public Member Functions
hoftcache.tempcache Class Reference

Public Member Functions

def __delitem__
def __delslice__
def __del__

Detailed Description

List-like object to hold lal.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 glue.lal 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 55 of file hoftcache.py.


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