def play(song, artist=None, album=None):
if not settings.platformCompatible():<EOL><INDENT>return False<EOL><DEDENT>if song and not artist and not album:<EOL><INDENT>(output, error) = subprocess.Popen(["<STR_LIT>", "<STR_LIT>", DEFAULT_ITUNES_PLAY % (song, song, song)], stdout=subprocess.PIPE).communicate()<EOL>if output:<EOL><INDENT>speech.speak("<STR_LIT>" + output)<EOL><DEDENT>else:<EOL><INDENT>speech.speak("<STR_LIT>" + song + "<STR_LIT>")<EOL><DEDENT><DEDENT>elif song and artist and not album:<EOL><INDENT>(output, error) = subprocess.Popen(["<STR_LIT>", "<STR_LIT>", ITUNES_SONG_AND_ARTIST % (song, artist, song, artist)], stdout=subprocess.PIPE).communicate()<EOL>if output:<EOL><INDENT>speech.speak("<STR_LIT>" + output)<EOL><DEDENT>else:<EOL><INDENT>speech.speak("<STR_LIT>" + song + "<STR_LIT>")<EOL><DEDENT><DEDENT>elif album and artist and not song:<EOL><INDENT>(output, error) = subprocess.Popen(["<STR_LIT>", "<STR_LIT>", ITUNES_ALBUM_AND_ARTIST % (artist, album)], stdout=subprocess.PIPE).communicate()<EOL>if output:<EOL><INDENT>speech.speak("<STR_LIT>" + output)<EOL><DEDENT>else:<EOL><INDENT>speech.speak("<STR_LIT>" + song + "<STR_LIT>")<EOL><DEDENT><DEDENT>elif album and not artist and not song:<EOL><INDENT>(output, error) = subprocess.Popen(["<STR_LIT>", "<STR_LIT>", ITUNES_ALBUM % (album)], stdout=subprocess.PIPE).communicate()<EOL>if output:<EOL><INDENT>speech.speak("<STR_LIT>" + output)<EOL><DEDENT>else:<EOL><INDENT>speech.speak("<STR_LIT>" + song + "<STR_LIT>")<EOL><DEDENT><DEDENT>elif artist and not album and not song:<EOL><INDENT>(output, error) = subprocess.Popen(["<STR_LIT>", "<STR_LIT>", ITUNES_ARTIST % (artist)], stdout=subprocess.PIPE).communicate()<EOL>if output:<EOL><INDENT>speech.speak("<STR_LIT>" + output)<EOL><DEDENT>else:<EOL><INDENT>speech.speak("<STR_LIT>" + song + "<STR_LIT>")<EOL><DEDENT><DEDENT>
Tells iTunes to play a given song/artist/album - MACOSX ONLY