type OutputNode
source code
object --+
|
Node.VLibNode --+
|
OutputNode
- Known Subclasses:
-
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 '
part of the iterator interface
raises StopIteration on failure
- Overrides:
Node.VLibNode.next
- (inherited documentation)
|
part of the iterator interface
raises StopIteration on failure
- Overrides:
Node.VLibNode.next
- (inherited documentation)
|