本文整理汇总了Python中pyxmpp.iq.Iq.get_node方法的典型用法代码示例。如果您正苦于以下问题:Python Iq.get_node方法的具体用法?Python Iq.get_node怎么用?Python Iq.get_node使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyxmpp.iq.Iq
的用法示例。
在下文中一共展示了Iq.get_node方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_push
# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import get_node [as 别名]
def make_push(self, digsby_protocol):
'Creates a set stanza.'
iq=Iq(stanza_type="set")
iq.set_to(digsby_protocol.jid.domain)
self.as_xml(parent=iq.get_node())
return iq
示例2: test_get_lang_class_from_node
# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import get_node [as 别名]
def test_get_lang_class_from_node(self):
iq = Iq(from_jid = "[email protected]", \
to_jid = "[email protected]", \
stanza_type = "get")
iq_node = iq.get_node()
iq_node.setLang("fr")
lang = self.lang.get_lang_class_from_node(iq_node)
self.assertEquals(lang, Lang.fr)
示例3: on_succ
# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import get_node [as 别名]
def on_succ(self, num_tries_taken, sock):
host_used = self.hosts_bytestreams.hosts[num_tries_taken-1].jid
self.my_sock = sock
i2 = Iq(to_jid=self.from_, stanza_type="result", stanza_id = self.respond_id)
b = ByteStreams()
b.host_used = JID(host_used)
b.as_xml(i2.get_node())
self.my_sock.found_terminator = self.close
self.my_sock.collect_incoming_data = self.collect_incoming_data
self.my_sock.set_terminator(self.si_ft.file.size)
self.my_sock.bind_event("socket_closed", self.closed)
self.my_sock.bind_event("socket_error", self.stream_error)
self.j.send(i2)
self.log.info("S5BFileXferHandler connect succeeded to %s", host_used)
self.event("stream_connected")
示例4: make_get
# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import get_node [as 别名]
def make_get(self, digsby_protocol):
iq = Iq(stanza_type="get")
iq.set_to(digsby_protocol.jid.domain)
self.as_xml(parent=iq.get_node())
return iq
示例5: make_set
# 需要导入模块: from pyxmpp.iq import Iq [as 别名]
# 或者: from pyxmpp.iq.Iq import get_node [as 别名]
def make_set(self, to):
iq = Iq(stanza_type="set")
iq.set_to(to)
self.as_xml(parent=iq.get_node())
return iq