| Trees | Indices | Help |
|
|---|
|
|
object --+
|
Node.VLibNode --+
|
OutputNode
base class for nodes which dump output
Assumptions:
- destination supports a write() method
- strFunc, if provided, returns a string representation of
the input
- inputs (parents) can be stepped through in lockstep
Usage Example:
>>> from rdkit.VLib.Supply import SupplyNode
>>> supplier = SupplyNode(contents=[1,2,3])
>>> from rdkit.six import StringIO
>>> sio = StringIO()
>>> node = OutputNode(dest=sio,strFunc=lambda x:'%s '%(str(x)))
>>> node.AddParent(supplier)
>>> node.next()
1
>>> sio.getvalue()
'1 '
>>> node.next()
2
>>> sio.getvalue()
'1 2 '
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
part of the iterator interface raises StopIteration on failure
|
part of the iterator interface raises StopIteration on failure
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Feb 1 16:13:01 2018 | http://epydoc.sourceforge.net |