Source

pyobjc / pyobjc-framework-ScriptingBridge / Examples / iTunesCurrentTrack.py

Full commit
1
2
3
4
5
6
7
#!/usr/bin/python

from ScriptingBridge import SBApplication

iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")

print iTunes.currentTrack().name()