Py-TOC v2.5 Released, works with TOC2
When it comes to communicating to AOL’s instant messenger servrices using Python we have several options.
You can get a load of information on the TOC protocols at the Wiki page. The document that describes the nitty gritty of the new protocol can be found here in the TerraIM CVS.
First you have Twisted. Mind you, I’ve never used Twisted, primarily because it seemed a little much to have to include an entire framework just to connect to AIM. They have two modules, one for the ASCII based TOC protocol and one for the binary based OSCAR protocol. For the TOC module it appears to be coded for the old protocol so it’s either going to work with limited ability or not at all. They also have an OSCAR module which is the binary protocol used by the official clients. I’m assuming this is the module that is used by most AIM-Python developers.
I have nothing against Twisted or any of its modules, I just prefer to use simple libraries that get the job done, tends to lead to a smaller code base which in turn leads to greater maintainability and smaller footprint.
To that end, a lot of people, and myself, used Jamie Turner’s Py-TOC library. However, a problem arose when AOL updated the TOC protocol to handle new features such as buddy icons and file transfers; they changed the login schema. It wasn’t long before someone reverse engineered it, however, the Py-TOC module was never updated to work with this new login schema. Feeling adventurous and having the help of Moss Collum, we were able to modify the 2.4 version to work with the new login.
The new library will soon be hosted on Jamie’s site, but until then, I provide to you, a new version of Py-TOC, 2.5. There are some changes to the events that handle server events and a new function to send raw toc commands to the server. Anyone who’s built a bot or application will have to make slight modifications but for the most part it’s all there. The new features are not yet implemented so feel free to take that on and develop it further. Until then, this should get you up and running.
If you have any questions, comments, or suggestions, or know of another Python TOC library, just reply here or shoot me an email at webdev [at] kritikal [dot] com.