summaryrefslogtreecommitdiff
path: root/examples/echo_client.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-08-18 01:06:59 -0700
committerLance Stout <lancestout@gmail.com>2011-08-18 01:06:59 -0700
commit015f662249eec9a0504bea1d614ad1138d8e19ab (patch)
treefa3da93e6dabd8a27aead8f034bb02e636d849e5 /examples/echo_client.py
parent8d998d71a3f21a8ee6e887b87daaed3285329522 (diff)
downloadslixmpp-015f662249eec9a0504bea1d614ad1138d8e19ab.tar.gz
slixmpp-015f662249eec9a0504bea1d614ad1138d8e19ab.tar.bz2
slixmpp-015f662249eec9a0504bea1d614ad1138d8e19ab.tar.xz
slixmpp-015f662249eec9a0504bea1d614ad1138d8e19ab.zip
Update examples to work with Python3 (raw_input vs input)
Diffstat (limited to 'examples/echo_client.py')
-rwxr-xr-xexamples/echo_client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/echo_client.py b/examples/echo_client.py
index cd1b1d02..122b20f0 100755
--- a/examples/echo_client.py
+++ b/examples/echo_client.py
@@ -24,6 +24,8 @@ import sleekxmpp
if sys.version_info < (3, 0):
reload(sys)
sys.setdefaultencoding('utf8')
+else:
+ raw_input = input
class EchoBot(sleekxmpp.ClientXMPP):
@@ -34,7 +36,7 @@ class EchoBot(sleekxmpp.ClientXMPP):
"""
def __init__(self, jid, password):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ sleekxmpp.ClientXMPP.__init__(self, jid, password, plugin_config={'feature_mechanisms': {'use_mech': 'PLAIN'}})
# The session_start event will be triggered when
# the bot establishes its connection with the server