Enter your contact information.
Enter your project information.
Step 3Choose the PHP programmers you want to hire.
Compare Free PHP Quotes
Interacting with Skype from Python using Skype4Py
*Attention PHP Programmers* - Add A Free Listing! Get more clients.
Skype4Py is a Python module that allows developers to programatically interact with the Skype client running on their computer. In this tutorial we will look at and use the Skype4Py module to create simple but useful scripts.
Installation
Skype4Py is a normal Python module and is listed in the Python package index (Pypi). To install it with setuptools enter the following in a command prompt.
easy_install Skype4Py
To install it with pip enter the following in a command prompt.
pip install Skype4Py
Getting Started
Skype4Py interacts with the Skype client running on your desktop, it doesn’t talk directly to the Skype servers. For any of the scripts we cover in this tutorial to work the Skype application must be running and you need to be logged in. You can either start Skype yourself or use the following snippet to start it using Skype4Py.
s = Skype4Py.Skype() if not s.Client.IsRunning: s.Client.Start()
Before we can interact with the Skype client from Skype2Py, we need to connect Skype4Py to the instance of Skype running on your desktop. This is done using the Attach method.
import Skype4Py s = Skype4Py.Skype() s.Attach()
After executing this you need to check the Skype client on your desktop. A notification similar to the one below will appear. This ensures that no virus or 3rd party program can use your Skype account without your knowledge. Click ‘Allow access’.

User Information
Skype4Py provides a User class which represents a user’s Skype account. We can access information such as the user’s full name, their Skype status and when they were last logged into Skype. To get the person who is currently logged into the Skype client’s information we need to use the CurrentUser class.
import Skype4Py s = Skype4Py.Skype() s.Attach() print 'Full Name: %s' % s.CurrentUser.FullName print 'Skype Status: %s' % s.CurrentUser.OnlineStatus print 'Country: %s' % s.CurrentUser.Country
To access information about the current Skype user’s friends, we need to use the Friends class. The snippet below iterates over all of the current Skype user’s friends and prints some information about them.
import Skype4Py s = Skype4Py.Skype() s.Attach() for f in s.Friends: print 'Full Name: %s' % f.FullName print 'Skype Status: %s' % f.OnlineStatus print 'Country: %s' % f.Country
Sending SMS Messages
Skype4Py can also be used to send SMS messages. Only Skype users who have credit in their Skype account can send SMS. Be sure to check local SMS rates on the Skype website before using and never put this code in a loop without double checking it first. Make sure you include your country’s international prefix at the beginning of the number variable. After using this code my phone received the SMS 20 seconds later (NZ carrier).
import Skype4Py s = Skype4Py.Skype() s.Attach() message = 'Hello SMS from Query7' number = '+641234567890' m = s.CreateSms(Skype4Py.smsMessageTypeOutgoing, number) m.Body = message m.Send()
What Else Can Skype4Py Do?
- Download and play voice mail messages
- Transfer files between Skype clients
- Interact with Skype chat messages
Mon, 03 Jan 2011 09:10:23 GMT
Tags: Python, Tutorials,
*Attention PHP Programmers* - Add A Free Listing! Get more clients.
Python
Open Source Web Projects in Python
You can find Python everywhere – Rapid Application Development, Game Deve
Tutorial: Django Template Tags
Introduction
In the Python Web Framework Django, template tags can be used to modify data that is about to be output in a Django template file. In this tutorial we will learn how to create and use our own template tags in a Django application.
Tutorials
Using Proxies with cURL in PHP
If you are new to using PHP and cURL please refer to the PHP cURL tutorial. It covers why you should using cURL (as opposed to file_get_contents) and goes over how to make cURL requests with a custom class.
Titanium Mobile Android Development: Soundboard App
In this series of tutorials we use Appcelerator’s Titanium Mobile platform to create Android applications. This tutorial walks you through developing and packaging a soundboard application. Full source and packaged application is available on Daphne
Web Design, Implementation, and Maintenance. PHP, Javascript, JQuery, MySql
Daphne, Alabama US
website creator chennai, web development firm chennai, product development in chennai, software developer in chennai, website designer in chennai, portal developing firm chennai SEO and SEM solutions
Chennai, Tamil Nadu IN
IceStar Media are a successful team of website designers, IT consultants and software programmers who have a proven track record in designing and delivering reliable business applications and websites
Stevenage, England GB
PHP/MySQL Developer
Zrenjanin, Vojvodina RS
Optimize your DirectAdmin backups with rSync
DirectAdmin offers some great backup which makes it possible to create a backup file for each user o
WordPress categories, optimization tips and custom pages
It’s not a SEO secret, inner links to / from strong category pages will help your site to rank
Titanium Mobile Android Development: Soundboard App
In this series of tutorials we use Appcelerator’s Titanium Mobile platform to create Android appl
Visually Stunning Redesign Showcases the 3-D Power of CSS
It's one thing to hear about the powerful new 3-D tools coming to CSS, but it's a very different thi
YouTube Begins Serving Up Native WebM Video
YouTube has announced it will begin offering HTML5 videos in the WebM codec to web browsers that sup
Article Tags
PHP Programmers Articles
Live Help Chat Software
Web Design Quote
Web Design