Controlling Winamp from Python

There were some approaches to controlling Winamp from Python. Since I lately needed one, I started googling for a solution that would suit my needs. Turned out all of them give control only over a limited number of Winamp functionalities. So, I decided to write my own.

I'm publishing this to change the above situation. So, if you need an easy to use and comprehensive Winamp controlling module for Python, try mine. It even supports undocumented features like obtaining of the volume setting. It is based on the standard ctypes module so you won't even need the win32 extensions to Python. Just make sure you have at least Python 2.5 and it will work.

Download:
winamp.py

Note: I was too lazy to add proper docstrings but the code should be quite readable I think.

3 Comments:

Ben said...

Thanks so much for this!

I have used this module in a simple server application, with which I interact using an HTML form served by Apache running mod_python.

By pointing my iPhone browser to the page, I can control my Winamp from anywhere in the house over WiFi... or anywhere on the Internet! :)

Thank you again,

Ben

awahlig said...

Nice to know you found it useful.

Thanks for letting me know.

Amitabh Sharma said...

Thanks!

Using your module and twyt, it took me over a minute to write a simple script to post updates of now playing tracks from winamp to twitter.