Я попытался сделать простую музыку потокового приложения с помощью Python + PyObjC следующих this blogPyObjC - потоковая музыка с NSSound
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()
И он не
>>> sound.play()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: cannot access attribute 'play' of NIL 'NSSound' object
Почему?