Trees | Indices | Help |
|
---|
|
object --+ | list --+ | Collection
Multiple objects (organized as a list).
Methods are applied to all objects in the Collection and returned as new Collection:
>>> from gromacs.analysis.collections import Collection >>> animals = Collection(['ant', 'boar', 'ape', 'gnu']) >>> animals.startswith('a') Collection([True, False, True, False])
Similarly, attributes are returned as a Collection.
Using :meth:`Collection.save` one can save the whole collection to disk and restore it later with the :meth:`Collection.load` method
>>> animals.save('zoo') >>> arc = Collection() >>> arc.load('zoo') >>> arc.load('zoo', append=True) >>> arc ['ant', 'boar', 'ape', 'gnu', 'ant', 'boar', 'ape', 'gnu']
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Pickle the whole collection to *filename*. If no extension is provided, ".collection" is appended. |
Load collection from pickled file *filename*. *append* determines if the saved collection is added to the current one or if it replaces the current content. If no extension is provided, ".collection" is appended. |
x.__getattribute__('name') <==> x.name
|
x+y
|
repr(x)
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jun 12 15:59:34 2010 | http://epydoc.sourceforge.net |