[Twisted-Python] Minimalist twisted.im interface

Tim Allen screwtape at froup.com
Sun Oct 20 05:37:47 MDT 2002


OK, here's my first draft at a minimalist twisted.im interface. It 
doesn't let you manage accounts or even actually speak, but it should be 
enough to give anyone else who wants to write a twisted.im interface a 
decent idea about what they're required to do.

As I said, there's no account management - how do you add accounts? 
Well, I'm kind of ashamed of the implementation, but basically there's a 
file called twisted.im.accounts that contains a list of account objects. 
I'm open to suggestions for improvements, especially improvements that 
involve (a) simple code, and (b) a system I can configure with vi.

There's no (useful) changes to existing code, so I'm not including a 
diff. Rather, I'm just attaching the new files. There's three, and they 
all go in twisted.im:

o accounts.py: This is your basic turing-complete configuration file, 
including comments.
o minchat.py: Modelled after basechat.py and gtkchat.py, this is the 
actual useful code.
o minaccount.py: Modelled after baseaccount.py and gtkaccount.py, this 
loads up the accounts and tells them to log in.

If you want to try running it, you should probably point python at 
minchat.py (which uses minaccount, at the bottom).

Also, I've not yet fully acclimatised to the Twisted paradigm - tell me 
if I'm doing something stupid or non-twisted-like.

Oh, before I forget - if I want to turn this into a nice bot framework 
suitable for being checked into CVS, where should I put it? 
twisted.im.bot?

Screwtape,
...in case some crazy person wants to check this in verbatim, I hereby 
assign copyright to Glyph...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: accounts.py
Type: application/octet-stream
Size: 1427 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20021020/c3b1f667/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minaccount.py
Type: application/octet-stream
Size: 1766 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20021020/c3b1f667/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minchat.py
Type: application/octet-stream
Size: 3518 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20021020/c3b1f667/attachment-0008.obj>


More information about the Twisted-Python mailing list