How do you listen to notifications from iTunes on a Mac (Using the NSDistributedNotificationCenter)
问题 Looking for help/tutorials/sample code of using python to listen to distributed notifications from applications on a mac. I know the py-objc lib is the bridge between python and mac/cocoa classes, and the Foundation library can be used to add observers, but looking for examples or tutorials on how to use this to monitor iTunes. 回答1: If anyone comes by to this question, i figured out how to listen, the code below works. However accessing attributes do not seem to work like standard python