How do I set a Jabber status with python-xmpp?

Posted by snostorm on Stack Overflow See other posts from Stack Overflow or by snostorm
Published on 2010-03-18T21:33:23Z Indexed on 2010/03/18 22:31 UTC
Read the original article Hit count: 322

Filed under:
|
|
|
|

How do I set a GChat or jabber status via python? Right now I've got this:

import xmpp     

new_status = "blah blah blah"
login = 'email' 
pwd   = 'password'

cnx = xmpp.Client('gmail.com')
cnx.connect( server=('talk.google.com',5223) )

cnx.auth(login, pwd, 'botty')

pres = xmpp.Presence()
pres.setStatus(new_status)
cnx.send(pres)

It executes, but the status is not updated. I know I'm connecting to the server successfully, as I can send chat messages to others. What am I doing wrong here?

© Stack Overflow or respective owner

Related posts about python

Related posts about xmpp