Take the 2-minute tour ×

I'm using the following bot (based on xmppy):

import xmpp, os

user = 'uname'
password = 'pass'

def message_handler(connect_object, message_node): 
        messageFromCounterPart = message_node.getBody()
        connect_object.send( xmpp.Message( message_node.getFrom() ,message_node.getBody()))

jid = xmpp.JID(user) 
connection = xmpp.Client(jid.getDomain()) 
connection.connect(server = (server, 5223)) 
result = connection.auth(jid.getNode(), password, "LFY-client") 
connection.RegisterHandler('message', message_handler) 
while connection.Process(1): 

How to cause it to receive and send files? Is there special name for stanzas in this case? (like in connection.RegisterHandler('message', message_handler)) Thanks.

share|improve this question
You should label the xmpp lib you used. –  Leonardo.Z Oct 22 '13 at 8:25
dumplicated with stackoverflow.com/questions/2851992/… –  Leonardo.Z Oct 22 '13 at 8:29
add comment


Your Answer



Browse other questions tagged or ask your own question.