Differences between revisions 2 and 3
Revision 2 as of 2009-01-18 08:11:42
Size: 962
Editor: ZoomQuiet
Comment:
Revision 3 as of 2009-01-18 08:11:55
Size: 963
Editor: ZoomQuiet
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
SEE:[:CnGtalkBot:GTalk机器人中文版] SEE: [:CnGtalkBot:GTalk机器人中文版]

TableOfContents

Include(ZPyUGnav)

xmmpppy 小实例

SEE: [:CnGtalkBot:GTalk机器人中文版]

23号

<[email protected]>

reply-to        [email protected]
to      [email protected]
date    Sun, Jan 18, 2009 at 16:06
subject [CPyUG:77341] Re: python做Gtalk通信,关于中文支持方面的问题

   1 #!/usr/bin/env python
   2 # -*- coding: UTF-8 -*-
   3 
   4 import xmpp
   5 jid = xmpp.protocol.JID('[email protected]')
   6 c = xmpp.Client(jid.getDomain(), debug=[])
   7 c.connect()
   8 c.auth(jid.getNode(), 'xxx')
   9 c.send(xmpp.protocol.Message('[email protected]', '中文测试!'))

中文试过,是可以的。


反馈

创建 by -- ZoomQuiet [DateTime(2009-01-18T08:11:12Z)]

PageComment2

[:/PageCommentData:PageCommentData]

MiscItems/2009-01-18 (last edited 2009-12-25 07:10:32 by localhost)