Update examples to work with Python3 (raw_input vs input)

This commit is contained in:
Lance Stout
2011-08-18 01:06:59 -07:00
parent 8d998d71a3
commit 015f662249
10 changed files with 49 additions and 10 deletions

View File

@@ -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