def loop_until(reactor, predicate, steps=None):
 if (steps is None):
  steps = repeat(0.1)
 steps = iter(steps)
 action = LOOP_UNTIL_ACTION(predicate=predicate)
 d = action.run(DeferredContext, maybeDeferred(action.run, predicate))
 def loop(result):
  if (not result):
   LOOP_UNTIL_ITERATION_MESSAGE(result=result).write()
   try:
    delay = steps.next()
   except StopIteration:
    raise LoopExceeded(predicate, result)
   d = deferLater(reactor, delay, action.run, predicate)
   d.addCallback(partial(action.run, loop))
   return d
  action.addSuccessFields(result=result)
  return result
 d.addCallback(loop)
 return d.addActionFinish()

def loop_until ( reactor , predicate , steps = None ) : if ( steps is None ) : steps = repeat ( 0.1 ) steps = iter ( steps ) action = LOOP_UNTIL_ACTION ( predicate = predicate ) d = action . run ( DeferredContext , maybeDeferred ( action . run , predicate ) ) def loop ( result ) : if ( not result ) : LOOP_UNTIL_ITERATION_MESSAGE ( result = result ) . write ( ) try : delay = steps . next ( ) except StopIteration : raise LoopExceeded ( predicate , result ) d = deferLater ( reactor , delay , action . run , predicate ) d . addCallback ( partial ( action . run , loop ) ) return d action . addSuccessFields ( result = result ) return result d . addCallback ( loop ) return d . addActionFinish ( )
repeatedly call predicate .