I'm retrieving the current track playing in iTunes, Mac OS X, with ScriptingBridge.
from ScriptingBridge import SBApplication
iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
print iTunes.currentTrack().name()
But when I run that last line, actually getting the track name, an application appears in the dock, and doesn't leave until I close my Python program, whether I'm running it in the REPL or as a script. The icon is this one, at least on my machine:
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources/PythonInterpreter.icns
The script works great, and I can get all the info I need from iTunes via SB. I would just like to keep the icon from popping up. Why does that particular method call invoke a dock icon?