Пример #1
0
    def receiver(self):
        print self.name(), ": waiting for messages on", self.msg1fifo.name()
        msg = self.msg1fifo.read()
        print self.name(), ": the sender was", msg["sender"]
        print self.name(), ": the command was", msg["command"]
        msg["foo.test"] = 123.456

        print self.name(), ": replying"
        gs.findReceiver(msg["reply"]).write(msg)
        print "receiver done in", self.name(), "in", gs.interpreter_name()
        try: t = gs.findReceiver("bad_name___opfjrafp")
        except gs.BadReceiverName:
          print "findReceiver did not work, as wanted"
Пример #2
0
 def cb(self, which):
   print which, "callback activated for", self.name(), "in", gs.interpreter_name()