My Skype4py post gets a lot of views even though it's minimally useful. Skype4Py seems to have problems with 64-bit Python and really hasn't been actively maintained.
You're really better off spending the $5 to gain access to the Python SkypeKit SDK if you want to develop apps using Skype. Read the API reference and the examples of how to place calls, send messages, etc and then register for an account ($5 one-time fee).
SkypeKit Python SDK reference
Register for Skype Developer Program
Random Python and software development-related musings. Code samples, tutorials, lists, rants, etc.
Showing posts with label skype. Show all posts
Showing posts with label skype. Show all posts
16 February 2012
19 March 2011
Easily Interact with the Skype API using Skype4Py
I have been working for a while on automating things that I do using Skype and Applescript. The primary task that I wish to automate is automatically dialing numbers from a call list one at a time and then dialing the next when I click a button on a simple graphical interface. So far I have a working Applescript version but when I came across a python library that was easier to use I thought I would give it a try.
To install Skype4Py just use setup tools and easy_install:
Unfortunately Skype4Py doesn't work 100% on OS X because of an issue with threading (and I'm a mac user). For example, if I try to place a call using s.PlaceCall(number) it says that the thread can only be started one time
To install Skype4Py just use setup tools and easy_install:
$ sudo easy_install Skype4PyHere's a quick snippet that displays the users from your friend list that currently have a status that is not included in the badStatusCodes list. It's not much and doesn't perform any error handling but it shows just how easy it is to get started using this library.
import Skype4Py s = Skype4Py.Skype() s.Attach() badStatusCodes = ['UNKNOWN', 'OFFLINE', 'DND', 'LOGGEDOUT'] availFriends = [] for f in s.Friends: if not f.OnlineStatus in badStatusCodes: availFriends.append(f) print "%s, %s" % (f.FullName, f.OnlineStatus)It seems like quite a useful tool if you are into IP telephony or just want to screw around with creating Skype bots and the like.
Unfortunately Skype4Py doesn't work 100% on OS X because of an issue with threading (and I'm a mac user). For example, if I try to place a call using s.PlaceCall(number) it says that the thread can only be started one time
>>> s.PlaceCall() Traceback (most recent call last): File "The following resources are very helpful when working with Skype4Py:", line 1, in File "build/bdist.macosx-10.3-fat/egg/Skype4Py/skype.py", line 691, in PlaceCall File "build/bdist.macosx-10.3-fat/egg/Skype4Py/skype.py", line 877, in _GetActiveCalls File "build/bdist.macosx-10.3-fat/egg/Skype4Py/skype.py", line 339, in _Search File "build/bdist.macosx-10.3-fat/egg/Skype4Py/skype.py", line 276, in _DoCommand File "build/bdist.macosx-10.3-fat/egg/Skype4Py/skype.py", line 778, in SendCommand File "build/bdist.macosx-10.3-fat/egg/Skype4Py/api/darwin.py", line 374, in send_command File "build/bdist.macosx-10.3-fat/egg/Skype4Py/api/darwin.py", line 327, in attach File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 467, in start raise RuntimeError("threads can only be started once") RuntimeError: threads can only be started once
Subscribe to:
Posts (Atom)