Wednesday, October 25, 2006

Success!

Yeee-haaa!

I've just connected to Skype using Python and the Skype API Framework. I get notifications, and can send commands:


seletz@yeti:~/develop/python/pyskype/test $python skypeapi-test-osx.py
2006-10-25 01:05:55.934 Python[14094] running event loop
2006-10-25 01:05:56.935 Python[14094] connecting to skype
2006-10-25 01:05:56.941 Python[14094] waiting ....
2006-10-25 01:06:00.547 Python[14094] skypeAttachResponse: 1
2006-10-25 01:06:00.576 Python[14094] skypeNotificationReceived: CONNSTATUS ONLINE
2006-10-25 01:06:00.578 Python[14094] skypeNotificationReceived: CURRENTUSERHANDLE seletz29
2006-10-25 01:06:00.578 Python[14094] skypeNotificationReceived: USERSTATUS ONLINE
2006-10-25 01:06:06.942 Python[14094] sending
2006-10-25 01:06:06.942 Python[14094] got answer: None
2006-10-25 01:06:06.943 Python[14094] skypeNotificationReceived: PROTOCOL 1



I've started a new project at Google Code, where I try to create a platform-independent Python wrapper for the Skype API.

The trick was, of course, RTFM. I just needed to use PyObjC to create a informal protocol for the delegate class I use to connect with the Skype API. It's rather byzantine how Apple encodes type information.