class documentation

class IPersistableContext(IContext): (source)

Known subclasses: codetools.contexts.i_context.IDataContext

View In Hierarchy

Add loading and saving to the interface.

Static Method load Unpickle the context from a file
Method save Pickle the data context out to a file

Inherited from IContext:

Method __contains__ Test whether the key is available in the context or not.
Method __delitem__ Remove the given key with [] access.
Method __getitem__ Get item with [] access.
Method __setitem__ Set item with [] access.
Method keys Returns the list of keys available in the context.
@staticmethod
def load(file_or_path): (source)

Unpickle the context from a file Parameters ---------- file_or_path : str or readable filelike object Returns ------- context : object

def save(self, file_or_path): (source)

Pickle the data context out to a file Parameters ---------- file_or_path : str or writable filelike object