Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

pythonic interface for OS X launchd

Project Description

launchd is a pythonic interface to interact with OS X’s launchd. It provides access to basic querying and interaction with launchd. It is implemented using the Objective C ServiceManagement framework as well as the launchd command line utility. Therefore, this python package can only be used on OS X

The python objective C bridge contains some special types. This package strips off all non built-in type information and returns pure python data.


The relevant import statement is:

import launchd

Listing all launchd jobs:

for job in
    print(job.label,, job.status,, job.plistfilename)

Find the pid and laststatus of a job:

>>> launchd.LaunchdJob("").pid

>>> launchd.LaunchdJob("").laststatus

>>> launchd.LaunchdJob("com.example.fubar").pid
Traceback (most recent call last):
  File "launchd/", line 78, in refresh
    raise ValueError("job '%s' does not exist" % self.label)
ValueError: job 'com.example.fubar' does not exist

Detect if a job exists:

>>> launchd.LaunchdJob("com.example.fubar").exists()

launchd job properties (these come directly from launchd and NOT the .plist files):

>>> launchd.LaunchdJob("").properties
{'OnDemand': 1, 'PID': 278, 'PerJobMachServices': {'': 0,
'': 0, '': 0,
'': 0}, 'LimitLoadToSessionType': 'Aqua',
'Program': '/System/Library/CoreServices/',
'TimeOut': 30, 'LastExitStatus': 0, 'Label': '',
'MachServices': {'': 10}}

>>> launchd.LaunchdJob("").properties["OnDemand"]

Find all plist filenames of currently running jobs:

for job in
   if is None or job.plistfilename is None:

Job properties of a given job (this uses the actual .plist file):

{'ProgramArguments': ['/usr/libexec/kextd'], 'KeepAlive': {'SuccessfulExit': False},
'POSIXSpawnType': 'Interactive', 'MachServices': {'':
{'HostSpecialPort': 15}}, 'Label': ''}


$ pip install launchd

or, if you want to work using the source tarball:

$ python install


  • OS X >= 10.6
  • Python 2.7, 3.2 or 3.3
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
launchd-0.1.1-py27-none-any.whl (11.5 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jun 19, 2014
launchd-0.1.1-py32-none-any.whl (12.2 kB) Copy SHA256 Checksum SHA256 3.2 Wheel Jun 19, 2014
launchd-0.1.1-py33-none-any.whl (11.5 kB) Copy SHA256 Checksum SHA256 3.3 Wheel Jun 19, 2014
launchd-0.1.1-py3-none-any.whl (11.5 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Jun 19, 2014
launchd-0.1.1.tar.gz (8.3 kB) Copy SHA256 Checksum SHA256 Source Nov 7, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting