Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from twisted.words.protocols.jabber.jid import JID
- from wokkel import client
- secret = 'mysecret'
- xmppClient = client.XMPPClient(jid, secret)
- xmppClient.logTraffic = True
- if __name__ == "__main__":
- # Start as a regular Python script.
- import sys
- from twisted.python import log
- from twisted.internet import reactor
- log.startLogging(sys.stdout, setStdout=0)
- xmppClient.startService()
- reactor.run()
- else:
- # Start as a Twisted Application
- from twisted.application import service
- application = service.Application("XMPP Client")
- xmppClient.setServiceParent(application)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement