You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(4) |
Feb
|
Mar
|
Apr
(5) |
May
(11) |
Jun
|
Jul
|
Aug
(7) |
Sep
(17) |
Oct
(4) |
Nov
(1) |
Dec
(10) |
2005 |
Jan
(9) |
Feb
(10) |
Mar
(3) |
Apr
(4) |
May
(12) |
Jun
(24) |
Jul
(22) |
Aug
(29) |
Sep
(74) |
Oct
(47) |
Nov
(25) |
Dec
(22) |
2006 |
Jan
(36) |
Feb
(9) |
Mar
(36) |
Apr
(33) |
May
(39) |
Jun
(9) |
Jul
(18) |
Aug
(18) |
Sep
(26) |
Oct
(48) |
Nov
(14) |
Dec
(9) |
2007 |
Jan
(10) |
Feb
(2) |
Mar
(9) |
Apr
(3) |
May
(9) |
Jun
|
Jul
(12) |
Aug
(20) |
Sep
|
Oct
(16) |
Nov
(4) |
Dec
(21) |
2008 |
Jan
(32) |
Feb
(11) |
Mar
(4) |
Apr
(13) |
May
(13) |
Jun
(16) |
Jul
(1) |
Aug
(8) |
Sep
(9) |
Oct
(23) |
Nov
(7) |
Dec
|
2009 |
Jan
(17) |
Feb
(11) |
Mar
(35) |
Apr
(10) |
May
(8) |
Jun
(14) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
|
Dec
(5) |
2010 |
Jan
(15) |
Feb
(4) |
Mar
|
Apr
|
May
(5) |
Jun
(4) |
Jul
(3) |
Aug
(1) |
Sep
(10) |
Oct
(2) |
Nov
(8) |
Dec
(3) |
2011 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(4) |
Sep
|
Oct
|
Nov
(4) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
(5) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(14) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bryan O. <bry...@gm...> - 2010-12-21 17:00:11
|
I've got a simple client working that connects to a group chat. Now I want to implement the ability to set the status to 'away' and/or log out of the server. My first attempts don't seem to work -- if I call the disconnect() method on the client that works, but then I'm not able to reconnect. This makes me wonder if there's a more proper way to leave a chatroom. My initialization code looks like this: self.client = xmpp.Client(jid.getdomain(), debug=[]) self.client.connect() self.client.auth(jid.getNode(), password) self.client.sendpresence("%s/%s" % (room, nick)) That all works great and I'm able to chat with people in the room. What must I do to log out of that room (ie: set my status to 'away'), yet be able to log back in later? Thanks! |
From: Luiz H. C. B. P. <lui...@gm...> - 2010-11-17 12:15:50
|
Thanks |
From: Yann L. <as...@la...> - 2010-11-17 12:03:41
|
Le 17/11/2010 12:40, Luiz Henrique Castello Branco Pannoni a écrit : > Hi guys > i was wondering if the XMPPPY give support to voice chat . > I couldn't find any information about that > is it possible to implement it in XMPPPY? > thanks anyway There is no jingle support in xmpppy, but you can implement everything on top of xmpppy, so yes it's doable. -- Yann |
From: Luiz H. C. B. P. <lui...@gm...> - 2010-11-17 11:40:13
|
Hi guys i was wondering if the XMPPPY give support to voice chat . I couldn't find any information about that is it possible to implement it in XMPPPY? thanks anyway |
From: Norman R. <no...@ra...> - 2010-11-13 23:10:34
|
the session id is generated by the http-bind connection manager, so xmpppy isn't involved, wha are you using for your connection manager? On Tue, Nov 9, 2010 at 5:28 AM, shreekant bohra <skb...@gm...>wrote: > > I am trying to make xwchat and xmpppy work together following this blog > post , > http://codingcromulence.blogspot.com/2009/01/chat-hacking-part-ii.html But > unable to get session id and other information from xmpppy connection. Does > anyone has prior experience with this ? > > -- > Shree Kant Bohra > Let the Source be open > www.geekybuddha.org > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: Norman R. <no...@ra...> - 2010-11-13 23:06:44
|
On Fri, Oct 29, 2010 at 4:26 AM, salil GK <gk...@gm...> wrote: > Hello > > This is my first post to this mailing list. I am trying to make my bot > using xmpppy and found that connect is failing. The following is what I am > doing. > > ------ > [root@localhost GMAIL]# cat test1.py > #!/usr/bin/python > # $Id: xsend.py,v 1.8 2006/10/06 12:30:42 normanr Exp $ > import sys,os,xmpp,time > > if len(sys.argv) < 2: > print "Syntax: xsend JID text" > sys.exit(0) > > tojid=sys.argv[1] > text=' '.join(sys.argv[2:]) > > jidparams={'jid':'gk...@gm... <jid%27%3A%27g...@gm...> > ','password':'password'} > > jid=xmpp.protocol.JID(jidparams['jid']) > print jid > cl=xmpp.Client(jid.getDomain(),debug=[]) > try: cl=xmpp.Client('talk.google.com',debug=[]) also can try removing ,debug=[] to get extra information about the connection. print cl > > con=cl.connect() > if not con: > print 'could not connect!' > sys.exit() > print 'connected with',con > > > auth=cl.auth(jid.getNode(),jidparams['password'],resource=jid.getResource()) > if not auth: > print 'could not authenticate!' > sys.exit() > print 'authenticated using',auth > > #cl.SendInitPresence(requestRoster=0) # you may need to uncomment this > for old server > id=cl.send(xmpp.protocol.Message(tojid,text)) > print 'sent message with id',id > > time.sleep(1) # some older servers will not send the message if you > disconnect immediately after sending > > #cl.disconnect() > > ------- > > [root@localhost GMAIL]# ./test1.py 1 2 > \/usr/lib/python2.6/site-packages/xmpppy-0.5.0rc1-py2.6.egg/xmpp/auth.py:24: > DeprecationWarning: the sha module is deprecated; use the hashlib module > instead > /usr/lib/python2.6/site-packages/xmpppy-0.5.0rc1-py2.6.egg/xmpp/auth.py:26: > DeprecationWarning: the md5 module is deprecated; use hashlib instead > gk...@gm... > <xmpp.client.Client instance at 0xb7c9ffec> > could not connect! > You have new mail in /var/spool/mail/root > > > > --------- > > What could be the issue here. I have internet access in this machine and I > can ping google site from there. > > Thanks > Salil > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America > contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: shreekant b. <skb...@gm...> - 2010-11-09 05:28:42
|
I am trying to make xwchat and xmpppy work together following this blog post ,http://codingcromulence.blogspot.com/2009/01/chat-hacking-part-ii.html But unable to get session id and other information from xmpppy connection. Does anyone has prior experience with this ? -- Shree Kant Bohra Let the Source be open www.geekybuddha.org |
From: Jean S. <je...@sc...> - 2010-11-05 14:04:30
|
Replying to myself :) message = xmpp.protocol.Message(conf, "I love python", "groupchat") -- Jean Schurger http://schurger.org GPG: http://schurger.org/jean.asc |
From: Jean S. <je...@sc...> - 2010-11-04 20:13:11
|
Hi, i try to use xmpppy to send messages on a conference but i have a problem: Here is basicaly how y do: ---- [...] conf = "conf@xxxxx" [...] def presence_cb(session, presence): nick = presence.getFrom().getResource() print presence if nick == nickname: sleep(30) message = xmpp.protocol.Message(conf, "I love python") client.send(message) [...] con = client.connect() client.RegisterHandler('message', message_cb) client.RegisterHandler('presence', presence_cb) assert con, "Could not connect" auth = client.auth(jid.getNode(), _password, resource=jid.getResource()) assert auth, "Could not authenticate" presence = xmpp.Presence(to='%s/%s' % (conf, nickname)) presence.setTag('x', namespace=xmpp.NS_MUC).setTagData('password', conf_password) presence.getTag('x').addChild('history', {'maxchars': '0', 'maxstanzas': '0'}) client.send(presence) [...] ---- I receive the presence informations, including my presence. I wait 30s, And when i send me message, i get: <message xmlns="jabber:client" to="yyyy@xxxxxxx/4429672311288898263594474" from="conf@xxxxxxxxx" id="4" type="error"> <body>I love python</body> <error code="400" type="modify"> <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /> </error> </message> Any idea of what's wrong ? -- Jean Schurger http://schurger.org GPG: http://schurger.org/jean.asc |
From: salil GK <gk...@gm...> - 2010-10-29 03:26:25
|
Hello This is my first post to this mailing list. I am trying to make my bot using xmpppy and found that connect is failing. The following is what I am doing. ------ [root@localhost GMAIL]# cat test1.py #!/usr/bin/python # $Id: xsend.py,v 1.8 2006/10/06 12:30:42 normanr Exp $ import sys,os,xmpp,time if len(sys.argv) < 2: print "Syntax: xsend JID text" sys.exit(0) tojid=sys.argv[1] text=' '.join(sys.argv[2:]) jidparams={'jid':'gk...@gm... <jid%27%3A%27g...@gm...> ','password':'password'} jid=xmpp.protocol.JID(jidparams['jid']) print jid cl=xmpp.Client(jid.getDomain(),debug=[]) print cl con=cl.connect() if not con: print 'could not connect!' sys.exit() print 'connected with',con auth=cl.auth(jid.getNode(),jidparams['password'],resource=jid.getResource()) if not auth: print 'could not authenticate!' sys.exit() print 'authenticated using',auth #cl.SendInitPresence(requestRoster=0) # you may need to uncomment this for old server id=cl.send(xmpp.protocol.Message(tojid,text)) print 'sent message with id',id time.sleep(1) # some older servers will not send the message if you disconnect immediately after sending #cl.disconnect() ------- [root@localhost GMAIL]# ./test1.py 1 2 \/usr/lib/python2.6/site-packages/xmpppy-0.5.0rc1-py2.6.egg/xmpp/auth.py:24: DeprecationWarning: the sha module is deprecated; use the hashlib module instead /usr/lib/python2.6/site-packages/xmpppy-0.5.0rc1-py2.6.egg/xmpp/auth.py:26: DeprecationWarning: the md5 module is deprecated; use hashlib instead gk...@gm... <xmpp.client.Client instance at 0xb7c9ffec> could not connect! You have new mail in /var/spool/mail/root --------- What could be the issue here. I have internet access in this machine and I can ping google site from there. Thanks Salil |
From: salil GK <gk...@gm...> - 2010-10-29 02:50:09
|
Please ignore this |
From: Norman R. <no...@ra...> - 2010-09-30 10:38:35
|
On Thu, Sep 30, 2010 at 2:14 AM, Jaikit Savla <jkt...@gm...> wrote: > I am connecting to facebook xmpp server. I am able to login correctly. But > while closing the stream using disconnect method it throws following > message: > > self.con=self.jabber.connect() > > auth=self.jabber.auth(self.jid.getNode(),self.acc.password,resource=self.jid.getResource()) > self.jabber.Dispatcher.disconnect() #logging off facebook client > > DEBUG: socket sent </stream:stream> > DEBUG: socket got </stream:stream> > DEBUG: socket error Socket error while receiving data > DEBUG: client stop Disconnect detected > DEBUG: socket error Socket operation failed > > > After logoff my buddies can still see me online. Hence I am skeptical about > socket error while disconnecting. Am I doing something wrong here ? > > The socket error after the stream close is fine. You could call self.jabber.sendPresence(typ='unavailable') before the disconnect, that will send offline presence before disconnecting. --Jaikit > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: Jaikit S. <jkt...@gm...> - 2010-09-30 01:15:21
|
I am connecting to facebook xmpp server. I am able to login correctly. But while closing the stream using disconnect method it throws following message: self.con=self.jabber.connect() auth=self.jabber.auth(self.jid.getNode(),self.acc.password,resource=self.jid.getResource()) self.jabber.Dispatcher.disconnect() #logging off facebook client DEBUG: socket sent </stream:stream> DEBUG: socket got </stream:stream> DEBUG: socket error Socket error while receiving data DEBUG: client stop Disconnect detected DEBUG: socket error Socket operation failed After logoff my buddies can still see me online. Hence I am skeptical about socket error while disconnecting. Am I doing something wrong here ? --Jaikit |
From: Jaikit S. <jkt...@gm...> - 2010-09-29 17:42:07
|
I am currently using this hack for logging : self.jabber=xmpp.Client(self.jid.getDomain()) self.jabber._DEBUG._fh=open(self.getLogURL(),'w') #here both _DEBUG and _fh are suppose to be private variables. override the debug file handle. Thanks for pointing out log_file attribute. On Wed, Sep 29, 2010 at 12:59 AM, Yann Leboulanger <as...@la...>wrote: > Le 29/09/2010 09:34, jkt...@gm... a écrit : > > I am looking for some python logger solution. If nothing is available I > will redirect it. Thanks > > The debug class has a log_file attribute, but it's not possible to set > it from client class. So indeed nothing is available in xmpppy to log to > a file. That's not terrible because redirecting to a file is not easily > redable because of chars that are use to have color in debug output like > "[30;1m" > > -- > Yann > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > |
From: Yann L. <as...@la...> - 2010-09-29 08:54:07
|
Le 29/09/2010 09:34, jkt...@gm... a écrit : > I am looking for some python logger solution. If nothing is available I will redirect it. Thanks The debug class has a log_file attribute, but it's not possible to set it from client class. So indeed nothing is available in xmpppy to log to a file. That's not terrible because redirecting to a file is not easily redable because of chars that are use to have color in debug output like "[30;1m" -- Yann |
From: <jkt...@gm...> - 2010-09-29 07:35:18
|
I am looking for some python logger solution. If nothing is available I will redirect it. Thanks On Sep 28, 2010, at 10:07 PM, Yann Leboulanger <as...@la...> wrote: > On 09/29/2010 12:29 AM, Jaikit Savla wrote: >> I wanted to log all the xmpppy interactions using Debug class. I >> initialized my client using xmpp.Client class: "self.jabber = >> xmpp.Client(jid.getDomain) # , debug=[]" >> >> I can see all the messages on console. But how do I redirect all the >> console message to log file ? Any clue ? > > use bash redirect: > python myapp.py 2> file.log > > -- > Yann > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel |
From: Yann L. <as...@la...> - 2010-09-29 05:08:10
|
On 09/29/2010 12:29 AM, Jaikit Savla wrote: > I wanted to log all the xmpppy interactions using Debug class. I > initialized my client using xmpp.Client class: "self.jabber = > xmpp.Client(jid.getDomain) # , debug=[]" > > I can see all the messages on console. But how do I redirect all the > console message to log file ? Any clue ? use bash redirect: python myapp.py 2> file.log -- Yann |
From: Jaikit S. <jkt...@gm...> - 2010-09-28 22:30:15
|
I wanted to log all the xmpppy interactions using Debug class. I initialized my client using xmpp.Client class: "self.jabber = xmpp.Client(jid.getDomain) # , debug=[]" I can see all the messages on console. But how do I redirect all the console message to log file ? Any clue ? Thanks, Jaikit |
From: Norman R. <no...@ra...> - 2010-09-17 08:53:46
|
You could call client.getRoster() on connect (and don't store it's return value anywhere), and then use client.Roster from your presence handler. On Tue, Sep 14, 2010 at 5:26 PM, David Gregory <da...@en...>wrote: > I’m trying to get my client UI respond to presence updates. Seems easy. > Set up presence and iq handlers and track them. > > But you end up repeating all the work that the roster has done already in > its own presence and iq handlers. > > > > It would be better to be notified when the roster has been updated for a > particular contact, so then I can go grab all of the item info and pass it > on to my client. I don’t see this mechanism in place – only the ability to > hook into the same raw presence and iq updates that the roster receives. > > > > I’ve tried several workarounds so I don’t have to modify XMPPPY. > > > > I’ve tried to cache the roster ptr after I retrieve it on connect, and then > look up into it in my own presence handler when any updates are received. > The problem with this is – there is a period of time during which the > presence updates I receive will not have a cached roster ptr to look up into > – because the “getRoster” method hasn’t returned yet. It means that my > “show”, “status” and other information is not correct during client connect, > until I receive the next presence update for each person. > > > > If, instead of caching the roster ptr, I actually call client.getRoster() > in my presence handler and then access the items that way, I will crash/have > a problem where the initial roster is still being pulled, and that > “Process(10)” call is blocking (in roster.py). > > > > Has anyone figured out a way to reliably access the roster at *any* time, > as the code is now? > > > > Seems like my fallback is to add a callback mechanism to roster.py to > notify me when a contact is updated, and pass “self” to the caller so he can > peek back at the roster item, and then pass it on. > > > > -Dave > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: David G. <da...@en...> - 2010-09-14 16:48:15
|
I’m trying to get my client UI respond to presence updates. Seems easy. Set up presence and iq handlers and track them. But you end up repeating all the work that the roster has done already in its own presence and iq handlers. It would be better to be notified when the roster has been updated for a particular contact, so then I can go grab all of the item info and pass it on to my client. I don’t see this mechanism in place – only the ability to hook into the same raw presence and iq updates that the roster receives. I’ve tried several workarounds so I don’t have to modify XMPPPY. I’ve tried to cache the roster ptr after I retrieve it on connect, and then look up into it in my own presence handler when any updates are received. The problem with this is – there is a period of time during which the presence updates I receive will not have a cached roster ptr to look up into – because the “getRoster” method hasn’t returned yet. It means that my “show”, “status” and other information is not correct during client connect, until I receive the next presence update for each person. If, instead of caching the roster ptr, I actually call client.getRoster() in my presence handler and then access the items that way, I will crash/have a problem where the initial roster is still being pulled, and that “Process(10)” call is blocking (in roster.py). Has anyone figured out a way to reliably access the roster at *any* time, as the code is now? Seems like my fallback is to add a callback mechanism to roster.py to notify me when a contact is updated, and pass “self” to the caller so he can peek back at the roster item, and then pass it on. -Dave |
From: Norman R. <no...@ra...> - 2010-09-02 11:21:33
|
On Tue, Aug 31, 2010 at 7:02 AM, Bino Oetomo <bi...@in...>wrote: > Dear All. > > I play with JabberBot from your example. > I try to make this bot do other thing than just replaying the caller. > > Now .. I need to expand this bot to also listen to a TCP-Port > > I adopt the socket server from example 20.17.4.3 of > <http://docs.python.org/library/socketserver.html> > http://docs.python.org/library/socketserver.html > > what i did is : > 1. in jabberbot.py > at the bottom, I add > ----START---- > class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): > > def handle(self): > data = self.request.recv(1024) > cur_thread = threading.currentThread() > response = "%s: %s" % (cur_thread.getName(), data) > #self.request.send(response) > > #Lets try to FORWARD data incoming via TCP port to others at > the XMPP side > JabberBot.send('bi...@ja...', data) > change this to bot.send. It needs an instance of JabberBot, not the class. > > class ThreadedTCPServer(SocketServer.ThreadingMixIn, > SocketServer.TCPServer): > pass > ----STOP----- > > 2. in broadcast.py > Inside --> class BroadcastingJabberBot > at the bottom part of --> def __init__( self, jid, password, res = None): > I add > ---START---- > HOST, PORT = "localhost", 50008 > > server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler) > ip, port = server.server_address > > # Start a thread with the server -- that thread will then start one > # more thread for each request > server_thread = threading.Thread(target=server.serve_forever) > # Exit the server thread when the main thread terminates > server_thread.setDaemon(False) > server_thread.start() > print "Server loop running in thread:", server_thread.getName() > > #-------End of socket server > > ----STOP----- > > I try to run the broadcast.py .. looks fine > > Next, from another shell .. I try to do --> bino@erp:~/Documents$ echo > "it's me" |nc 127.0.0.1 50008 > > At the bot shell , I got this error : > -----START----- > Exception happened during processing of request from ('127.0.0.1', 51188) > Traceback (most recent call last): > File "/usr/lib/python2.6/SocketServer.py", line 558, in > process_request_thread > self.finish_request(request, client_address) > File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request > self.RequestHandlerClass(request, client_address, self) > File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__ > self.handle() > File "/home/bino/Documents/iwic/kode/jb01/jabberbot.py", line 506, in > handle > JabberBot.send('bi...@ja...', data) > TypeError: unbound method send() must be called with JabberBot instance > as first argument (got str instance instead) > ------STOP------ > > So , Kindly please tell me what I have to do to fix this problem. > > > Sincerely > -bino- > > > ------------------------------------------------------------------------------ > This SF.net Dev2Dev email is sponsored by: > > Show off your parallel programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > _______________________________________________ > Xmpppy-devel mailing list > Xmp...@li... > https://lists.sourceforge.net/lists/listinfo/xmpppy-devel > -- - Norman Rasmussen - Email: no...@ra... - Home page: http://norman.rasmussen.co.za/ |
From: Bino O. <bi...@in...> - 2010-08-31 06:00:54
|
Dear All. I play with JabberBot from your example. I try to make this bot do other thing than just replaying the caller. Now .. I need to expand this bot to also listen to a TCP-Port I adopt the socket server from example 20.17.4.3 of <http://docs.python.org/library/socketserver.html> http://docs.python.org/library/socketserver.html what i did is : 1. in jabberbot.py at the bottom, I add ----START---- class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): def handle(self): data = self.request.recv(1024) cur_thread = threading.currentThread() response = "%s: %s" % (cur_thread.getName(), data) #self.request.send(response) #Lets try to FORWARD data incoming via TCP port to others at the XMPP side JabberBot.send('bi...@ja...', data) class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): pass ----STOP----- 2. in broadcast.py Inside --> class BroadcastingJabberBot at the bottom part of --> def __init__( self, jid, password, res = None): I add ---START---- HOST, PORT = "localhost", 50008 server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler) ip, port = server.server_address # Start a thread with the server -- that thread will then start one # more thread for each request server_thread = threading.Thread(target=server.serve_forever) # Exit the server thread when the main thread terminates server_thread.setDaemon(False) server_thread.start() print "Server loop running in thread:", server_thread.getName() #-------End of socket server ----STOP----- I try to run the broadcast.py .. looks fine Next, from another shell .. I try to do --> bino@erp:~/Documents$ echo "it's me" |nc 127.0.0.1 50008 At the bot shell , I got this error : -----START----- Exception happened during processing of request from ('127.0.0.1', 51188) Traceback (most recent call last): File "/usr/lib/python2.6/SocketServer.py", line 558, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__ self.handle() File "/home/bino/Documents/iwic/kode/jb01/jabberbot.py", line 506, in handle JabberBot.send('bi...@ja...', data) TypeError: unbound method send() must be called with JabberBot instance as first argument (got str instance instead) ------STOP------ So , Kindly please tell me what I have to do to fix this problem. Sincerely -bino- |
From: Mladen M. <mm...@gm...> - 2010-07-14 10:53:13
|
Hi. Using xmpppy with gtalk account to send messages to another gtalk account. It works well. Here's my script: import xmpp jid=xmpp.protocol.JID('mm...@gm...') cl=xmpp.Client(jid.getDomain()) cl.connect(server = ('gmail.com', 5223)) cl.auth(jid.getNode(),'xxxxxxx') cl.send(xmpp.protocol.Message('xx...@gm...', 'test message')) My problem is when I put the recipient account to offline mode. The script sends the message, yet I never see it as received. When doing the same thing through an app (kopete). Recipient account offline, send message, set recipient online. The message is received either in gmail as email or in kopete depending on what was first used. Maybe someone had this problem and found a solution. regards mmlado |
From: Cheng, S. <shi...@gm...> - 2010-07-13 09:58:54
|
BTW, subscriptions of "self._receivers" are all "both" Best Regards. 程时睿 CHENG Shirui - - - - - Healthy and Happy Everyday! - - - - - const char* const GuiGui = "mon amour et l'unique"; On Tue, Jul 13, 2010 at 17:18, Cheng, Shirui <shi...@gm...> wrote: > Hi, > > I wrote a simple bot in the hope of serving as a conference bot: which > means passing text from one user to others in a certain group. > > while sending, my code is: > >> * def _sendToOthers(self, frm, bdy):* >> >> * self._debug('~~ %s: %s'%(frm, bdy), 'msgCB')* >> >> * self._receiversLock.acquire()* >> >> * for contact in self._receivers:* >> >> * if frm != contact:* >> >> * msg = protocol.Message(to = contact, body = '<%s>: >>> %s'%(frm, bdy), typ = 'chat')* >> >> * self._client.send(msg)* >> >> * self._receiversLock.release()* >> >> > for the first few messages, it worked fine, but after certain amount of > message, gtalk server returned with following error: > >> *Jul 13 17:12:43 DEBUG: socket sent <message to=" >>> shi...@gm..." type="chat" id="F19F7392ECE11AEE_133">* >> >> * <body><xx...@gm... <lt%3B...@gm...>>: 1</body>* >> >> * </message>* >> >> *Jul 13 17:12:43 DEBUG: socket got <message to=" >>> yy...@gm.../EA61B980" type="error" id="F19F7392ECE11AEE_133" from=" >>> shi...@gm...">* >> >> * <body><xx...@gm... <lt%3B...@gm...>>: 1</body>* >> >> * <**error **code="503" type="cancel">* >> >> * <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>* >> >> * </error>* >> >> * </message>* >> >> *Jul 13 17:12:47 DEBUG: socket got <message to=" >>> yy...@gm.../EA61B980" type="chat" id="F19F7392ECE11AEE_134" >>> iconset="classic" from="xx...@gm.../gmail.C7747B68">* >> >> * <body>2</body>* >> >> * <met:google-mail-signature >>> xmlns:met="google:metadata">Skx5zPxRXfU4X0DBUyy9w0PEmVk</met:google-mail-signature> >>> * >> >> * <cha:active xmlns:cha="http://jabber.org/protocol/chatstates"/>* >> >> * <nos:x value="disabled" xmlns:nos="google:nosave"/>* >> >> * <arc:record otr="false" xmlns:arc="http://jabber.org/protocol/archive >>> "/>* >> >> * </message>* >> >> *Jul 13 17:12:47 DEBUG: socket sent <message to=" >>> shi...@gm..." type="chat" id="F19F7392ECE11AEE_134">* >> >> * <body><xx...@gm... <lt%3B...@gm...>>: 2</body>* >> >> * </message>* >> >> *Jul 13 17:12:47 DEBUG: socket got <message to=" >>> yy...@gm.../EA61B980" type="error" id="F19F7392ECE11AEE_134" from=" >>> shi...@gm...">* >> >> * <body><xx...@gm... <lt%3B...@gm...>>: 2</body>* >> >> * <**error **code="503" type="cancel">* >> >> * <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>* >> >> * </error>* >> >> * </message>* >> >> > I googled but could not find any clue. Did I do something wrong? > > Thanks a lot in advance! > > Best Regards. > > 程时睿 > CHENG Shirui > - - - - - Healthy and Happy Everyday! - - - - - > const char* const GuiGui = "mon amour et l'unique"; > > > > > |
From: Cheng, S. <shi...@gm...> - 2010-07-13 09:19:05
|
Hi, I wrote a simple bot in the hope of serving as a conference bot: which means passing text from one user to others in a certain group. while sending, my code is: > * def _sendToOthers(self, frm, bdy):* > > * self._debug('~~ %s: %s'%(frm, bdy), 'msgCB')* > > * self._receiversLock.acquire()* > > * for contact in self._receivers:* > > * if frm != contact:* > > * msg = protocol.Message(to = contact, body = '<%s>: >> %s'%(frm, bdy), typ = 'chat')* > > * self._client.send(msg)* > > * self._receiversLock.release()* > > for the first few messages, it worked fine, but after certain amount of message, gtalk server returned with following error: > *Jul 13 17:12:43 DEBUG: socket sent <message to=" >> shi...@gm..." type="chat" id="F19F7392ECE11AEE_133">* > > * <body><xx...@gm... <lt%3B...@gm...>>: 1</body>* > > * </message>* > > *Jul 13 17:12:43 DEBUG: socket got <message to=" >> yy...@gm.../EA61B980" type="error" id="F19F7392ECE11AEE_133" from=" >> shi...@gm...">* > > * <body><xx...@gm... <lt%3B...@gm...>>: 1</body>* > > * <**error **code="503" type="cancel">* > > * <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>* > > * </error>* > > * </message>* > > *Jul 13 17:12:47 DEBUG: socket got <message to=" >> yy...@gm.../EA61B980" type="chat" id="F19F7392ECE11AEE_134" >> iconset="classic" from="xx...@gm.../gmail.C7747B68">* > > * <body>2</body>* > > * <met:google-mail-signature >> xmlns:met="google:metadata">Skx5zPxRXfU4X0DBUyy9w0PEmVk</met:google-mail-signature> >> * > > * <cha:active xmlns:cha="http://jabber.org/protocol/chatstates"/>* > > * <nos:x value="disabled" xmlns:nos="google:nosave"/>* > > * <arc:record otr="false" xmlns:arc="http://jabber.org/protocol/archive >> "/>* > > * </message>* > > *Jul 13 17:12:47 DEBUG: socket sent <message to=" >> shi...@gm..." type="chat" id="F19F7392ECE11AEE_134">* > > * <body><xx...@gm... <lt%3B...@gm...>>: 2</body>* > > * </message>* > > *Jul 13 17:12:47 DEBUG: socket got <message to=" >> yy...@gm.../EA61B980" type="error" id="F19F7392ECE11AEE_134" from=" >> shi...@gm...">* > > * <body><xx...@gm... <lt%3B...@gm...>>: 2</body>* > > * <**error **code="503" type="cancel">* > > * <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>* > > * </error>* > > * </message>* > > I googled but could not find any clue. Did I do something wrong? Thanks a lot in advance! Best Regards. 程时睿 CHENG Shirui - - - - - Healthy and Happy Everyday! - - - - - const char* const GuiGui = "mon amour et l'unique"; |