Skip to content

Instantly share code, notes, and snippets.

@legastero
Created May 28, 2010 15:05
Show Gist options
  • Select an option

  • Save legastero/417270 to your computer and use it in GitHub Desktop.

Select an option

Save legastero/417270 to your computer and use it in GitHub Desktop.
Registering a stream event handler.
# If self.xmpp is a SleekXMPP object and Task is a stanza object class
# See the wiki page Stanza Objects for details on Task
self.xmpp.registerHandler(
Callback('Example Handler',
MatchXPath('{%s}iq/{%s}task' % (self.xmpp.default_ns, Task.namespace),
self.handle_task))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment