skip to navigation
skip to content

Not Logged In

app 0.0.2

Python base class for Mac OS Applications

   pip install app

Usage ----------

Application class

from app import application
itunes=application("iTunes")
itunes.open() # open in background
print itunes.active,itunes.frontmost
>>> True, False
itunes.activate() # open and frontmost
print itunes.active,itunes.frontmost
>>> True, True

AppleScript

itunes.tell("play")

equal to:

tell application "iTunes"
    play
end tell
  • itunes.quit()

System Events

from app.system import events
print events.processes # processes list
print events.processes.frontmost # frontmost application
>>> Terminal
print "iCal" in events.processes
>>> True
 
File Type Py Version Uploaded on Size
app-0.0.2.tar.gz (md5) Source 2012-12-02 3KB
  • Downloads (All Versions):
  • 71 downloads in the last day
  • 403 downloads in the last week
  • 1393 downloads in the last month