I tried to make a simple music streaming app using Python+PyObjC following this blog
import Foundation
from AppKit import NSSound
sound = NSSound.alloc()
url = Foundation.NSURL.URLWithString_("http://206.217.213.235:8050/")
sound.initWithContentsOfURL_byReference_(url, True)
sound.play()
And it fails
>>> sound.play()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: cannot access attribute 'play' of NIL 'NSSound' object
Why?
It is because the NSSound object in AppKit provides a way to play AIFF and WAV sound files in Mac applications and not Shoutcast streams. See: http://nodebox.net/code/index.php/PyObjC
I quickly tried to find an existing Python module to do what you want, but it seems none exist. There are however plenty of apps, implemented in Python that do this, that you could analyse to figure out how they do it. For example: https://pypi.python.org/pypi/DeeFuzzer
The best alternative I could find for you was How do I capture an mp3 stream with python that talks about capturing a stream for local playback.