Skip to main content

python + iTunes.app (MacOS)

Project description

Installation

$ [sudo] pip install itunes

Functions

function __doc__
itunes.activate() open iTunes and make it frontmost
itunes.frontmost() return True if iTunes.app is frontmost app, else False
itunes.kill()
itunes.mute() mute iTunes
itunes.muted() return True if iTunes muted, else False
itunes.next() play next track
itunes.pid() return iTunes.app pid
itunes.prev() play previous track
itunes.quit() Quit iTunes
itunes.state() return player state string
itunes.stop() stop
itunes.tell(code) execute applescript tell application "iTunes" ...
itunes.unmute() unmute iTunes
itunes.helper.tell(code)
itunes.playlists.names()
itunes.playlists.play(playlist_name)
itunes.tracks.play(track, playlist)
itunes.volume.change(value)
itunes.volume.get()

Examples

vlc.tell(applescript) - execute applescript tell application "VLC" ...

>>> itunes.tell('play')
>>> itunes.play()
>>> itunes.pause()
>>> itunes.stop()
>>> itunes.next()
>>> itunes.prev()

playlists

>>> itunes.playlists.names()
["playlist1","playlist2"]

>>> itunes.playlists.play("playlist1")

play_track

>>> itunes.tracks.play("track_name","playlist")

volume

>>> itunes.volume.change(10)
>>> itunes.volume.get()
10

mute

>>> itunes.mute()
>>> itunes.muted()
True
>>> itunes.unmute()

process

>>> itunes.pid()
7654
>>> itunes.kill()

readme-generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itunes-2019.3.22.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

itunes-2019.3.22-py2.py3-none-any.whl (68.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page