Package twisted :: Package flow :: Module controller :: Class Block
[show private | hide private]
[frames | no frames]

Class Block

     Controller --+
                  |
Instruction --+   |
              |   |
          Stage --+
                  |
                 Block


A controller which blocks on Cooperate events

This converts a Stage into an iterable which can be used directly in python for loops and other iteratable constructs. It does this by eating any Cooperate values and sleeping. This is largely helpful for testing or within a threaded environment. It converts other stages into one which does not emit cooperate events.

[1,2, Cooperate(), 3] => [1,2,3]
Method Summary
  __init__(self, stage, *trap)
  __iter__(self)
(inherited from Stage)
  next(self)
fetch the next value from the Stage flow
  _yield(self)
executed during a yield statement by previous stage (inherited from Stage)

Method Details

next(self)

fetch the next value from the Stage flow

Generated by Epydoc 1.1 on Fri Jun 27 03:47:50 2003 http://epydoc.sf.net