Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)
set the sender (AID class)

src/s/p/SPADE-2.2.1/spade/Agent.py   SPADE(Download)
        if sender:
            a = AID.aid(name=sender, addresses=["xmpp://" + sender])
            msg.setSender(a)
        if reply_to:
            msg.setReplyTo(reply_to)
                    if envelope.getFrom():
                        try:
                            ACLmsg.setSender(envelope.getFrom().getStripped())
                        except:
                            ACLmsg.setSender(envelope.getFrom())
                    else:
                        ACLmsg.setSender(AID.aid(str(mess.getFrom().getStripped()), ["xmpp://" + str(mess.getFrom().getStripped())]))
                        ACLmsg.addReceiver(AID.aid(str(mess.getTo().getStripped()), ["xmpp://" + str(mess.getTo())]))
                else:
                    ACLmsg.setSender(AID.aid(str(mess.getFrom().getStripped()), ["xmpp://" + str(mess.getFrom().getStripped())]))
                    ACLmsg.addReceiver(AID.aid(str(mess.getTo().getStripped()), ["xmpp://" + str(mess.getTo().getStripped())]))
 

src/s/p/spade-HEAD/spade/Agent.py   spade(Download)
        if sender:
            a = AID.aid(name=sender, addresses=["xmpp://" + sender])
            msg.setSender(a)
        if reply_to:
            msg.setReplyTo(reply_to)
                    if envelope.getFrom():
                        try:
                            ACLmsg.setSender(envelope.getFrom().getStripped())
                        except:
                            ACLmsg.setSender(envelope.getFrom())
                    else:
                        ACLmsg.setSender(AID.aid(str(mess.getFrom().getStripped()), ["xmpp://" + str(mess.getFrom().getStripped())]))
                        ACLmsg.addReceiver(AID.aid(str(mess.getTo().getStripped()), ["xmpp://" + str(mess.getTo())]))
                else:
                    ACLmsg.setSender(AID.aid(str(mess.getFrom().getStripped()), ["xmpp://" + str(mess.getFrom().getStripped())]))
                    ACLmsg.addReceiver(AID.aid(str(mess.getTo().getStripped()), ["xmpp://" + str(mess.getTo().getStripped())]))
 

src/s/p/SPADE-2.2.1/spade/ACLParser.py   SPADE(Download)
 
        if 'sender' in m:
            msg.setSender(self.processAID(m['sender']))
 
        if 'receiver' in m:

src/s/p/spade-HEAD/spade/ACLParser.py   spade(Download)
 
        if 'sender' in m:
            msg.setSender(self.processAID(m['sender']))
 
        if 'receiver' in m: