Did I find the right examples for you? yes no

All Samples(10)  |  Call(9)  |  Derive(0)  |  Import(1)

        def notify(condition, action=lambda: None):
  condition.acquire()
  try:
    action()
    condition.notifyAll()
  finally:
    condition.release()
        


src/r/e/realtime-auction-HEAD/app/main.py   realtime-auction(Download)
  def post(self):
    user = users.get_current_user()
    model.Client.add( user )
    util.notify( user )
 
          util.notify_all(user, "You bid $%.2f for %s" % ( amount, item.title ) )
        else:
          util.notify( user, "Bid exceeds balance of $%.2f. Update your profile!" % float( balance / 100 ) ) # no good
      else:
        util.notify( user, "Bid must be more than $%.2f" % float( item.bid_info()['bid'] ) ) # no good
    else:
      util.notify( user, "Item '%s' is no longer being auctioned" % item.title ) # no good

src/q/p/qpid-python-0.26/qpid/delegates.py   qpid-python(Download)
 
import os, connection, session
from util import notify, get_client_properties_with_defaults
from datatypes import RangedSet
from exceptions import VersionError, Closed
  def connection_close_ok(self, ch, close_ok):
    self.connection.opened = False
    self.connection.closed = True
    notify(self.connection.condition)
 
  def session_attached(self, ch, a):
    notify(ch.session.condition)
 
  def session_detach(self, ch, d):
    #send back the confirmation of detachment before removing the
  def session_completed(self, ch, cmp):
    ch.session.sender.completed(cmp.commands)
    if cmp.timely_reply:
      ch.session_known_completed(cmp.commands)
    notify(ch.session.condition)
  def connection_open(self, ch, open):
    self.connection.opened = True
    ch.connection_open_ok()
    notify(self.connection.condition)