Answer:

    class component(microprocess):
    def __init__(self):
    super(component, self).__init__()
    self.boxes = { "inbox" : [], "outbox": [] }
    def send(self, value, outboxname):
    self.boxes[outboxname].append(value)
    def recv(self, inboxname):
    result = self.boxes[inboxname][0]
    del self.boxes[inboxname][0]
    return result
    def dataReady(self, inboxname):
    return len(self.boxes[inboxname])


Kamaelia is an open source project originated from and guided by BBC Research. For more information browse the site or get in contact.

This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)

(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved.

This web site is powered by the same code created for the bicker manor project. For more details, contact Michael Sparks at BBC Research directly (cf contact)