diff options
author | Lance Stout <lancestout@gmail.com> | 2010-09-01 14:47:42 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-09-01 14:47:42 -0400 |
commit | 9bef4b4d4d54768cb753e4bbfec049e97d063882 (patch) | |
tree | 364aaacfe5a0dbb74fe91420c4dadcf7d6a8310b | |
parent | 5c3066ba305c25bd1d9d8e262f3a119ed434bd72 (diff) | |
download | slixmpp-9bef4b4d4d54768cb753e4bbfec049e97d063882.tar.gz slixmpp-9bef4b4d4d54768cb753e4bbfec049e97d063882.tar.bz2 slixmpp-9bef4b4d4d54768cb753e4bbfec049e97d063882.tar.xz slixmpp-9bef4b4d4d54768cb753e4bbfec049e97d063882.zip |
Move the examples to a top-level examples directory.
-rw-r--r-- | examples/component.py (renamed from sleekxmpp/component_example.py) | 0 | ||||
-rw-r--r-- | examples/echo_client.py (renamed from example.py) | 12 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sleekxmpp/component_example.py b/examples/component.py index f24216c2..f24216c2 100644 --- a/sleekxmpp/component_example.py +++ b/examples/component.py diff --git a/example.py b/examples/echo_client.py index 4eb88b3b..5e6314f0 100644 --- a/example.py +++ b/examples/echo_client.py @@ -14,12 +14,12 @@ if sys.version_info < (3,0): class Example(sleekxmpp.ClientXMPP): - + def __init__(self, jid, password): sleekxmpp.ClientXMPP.__init__(self, jid, password) self.add_event_handler("session_start", self.start) self.add_event_handler("message", self.message) - + def start(self, event): self.getRoster() self.sendPresence() @@ -36,18 +36,18 @@ if __name__ == '__main__': optp.add_option("-j","--jid", dest="jid", help="JID to use") optp.add_option("-p","--password", dest="password", help="password to use") opts,args = optp.parse_args() - + logging.basicConfig(level=opts.loglevel, format='%(levelname)-8s %(message)s') xmpp = Example(opts.jid, opts.password) - xmpp.registerPlugin('xep_0030') + xmpp.registerPlugin('xep_0030') xmpp.registerPlugin('xep_0004') xmpp.registerPlugin('xep_0060') xmpp.registerPlugin('xep_0199') # use this if you don't have pydns, and want to # talk to GoogleTalk (e.g.) -# if xmpp.connect(('talk.google.com', 5222)): - if xmpp.connect(): + if xmpp.connect(('talk.google.com', 5222)): + #khif xmpp.connect(): xmpp.process(threaded=False) print("done") else: |