Home | Trees | Indices | Help |
|
---|
|
Simple container class with basic IO capabilities.
It is capable of storing itself in a file, or loading from a file using cPickle (optionally via zlib from compressed files). Any serializable object can be bound to a hamster to be stored.
To undig burried hamster use Hamster(filename). Here is an example:
>>> h = Hamster(bla='blai') >>> h.boo = N.arange(5) >>> h.dump(filename) ... >>> h = Hamster(filename)
Since Hamster introduces methods dump, asdict and property 'registered', those names cannot be used to assign an attribute, nor provided in among constructor arguments.
|
|||
a new object with type S, a subtype of T |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
__ro_attr = set(object.__dict__.keys()+ ['dump', 'registered', Attributes which come with being an object |
|
|||
Inherited from |
|
|
Initialize Hamster. Providing a single parameter string would treat it as a filename from which to undig the data. Otherwise all keyword parameters are assigned into the attributes of the object.
|
|
|
|
|
__ro_attrAttributes which come with being an object
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 23 23:09:34 2012 | http://epydoc.sourceforge.net |