[Twisted-Python] How to talk to IM's

Max Slimmer mslimmer at csbuilders.net
Mon Nov 14 02:20:02 EST 2005


I am trying to get into twisted, I have gone through the examples and have
purchased and read most of the book, but am still having problems
understanding just how things hang together. Any pointers to other sample
code, or documentation would be great.

What I am trying to do is to use the WORDS modules and be able to connect to
various IM servers and through them to known IM users.  I have gotten the
oscardemo to work connecting to ICQ, if I log in as user who is on another
users buddy list that user sees the demo logon and then I can send messages
to the demo which in turn echos the messages back.  All good.

Now I want to run another module in the reactor which can have access to the
IM (oscar) module and use it to send messages to some given IM client.  I am
having difficulty understanding how to get from one module to the other.
The oscardemo is initiated with protocol.ClientCreator and that returns a
deferred, I can then pass the deferred into the factory of my control module
and have access to it, but I don't know if that will help. It seems I need
access to the BOSconnection object in order to call its methods, but maybe I
need to re code the demo to use defereds and don't quit know where / how to
do that either.

I would like to be able to connect to twisted say with telnet to a command
module, and have it initiate a chat session in the IM module, it seems that
I only need a single instance of the IM module, and then a means to send
messages to it and get received messages from it and pass them back to some
instance of command module.

Any help, pointers to docs or good sample code would be much appreciated.

thanks,
max
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.0/167 - Release Date: 11/11/2005





More information about the Twisted-Python mailing list