Package cosmolopy :: Module saveable :: Class Saveable

Class Saveable

source code

object --+
         |
        Saveable
Known Subclasses:

An object with methods to save and restore.

Unpickleable attributes will simply be deleted from the object.

Instance Methods
 
__init__(self, filename=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
save(self, filename)
Save object to a file.
source code
 
load(self, filename)
Return an instance of an object unpickled from a file.
source code
 
dumb_pickle_filter(self)
Filter out attributes that can't be pickled.
source code
 
__getstate__(self)
Prepare a state of pickling.
source code
 
__setstate__(self, dict)
Unpickle.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, filename=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

dumb_pickle_filter(self)

source code 

Filter out attributes that can't be pickled.

Returns a copy of dict with