launchd.plist class
Project description
Installation
$ [sudo] pip install launchd-plist
Features
- Capitalized attrs and properties identified as launchd.plist keys (custom keys also supported)
Classes
class | __doc__ |
---|---|
launchd_plist.Plist |
launchd.plist class |
Functions
function | __doc__ |
---|---|
launchd_plist.read(path) |
return a dictionary with plist file data |
launchd_plist.update(path, **kwargs) |
update plist file data |
launchd_plist.write(path, data) |
write data dictionary to a plist file |
Examples
>>> class MyPlist(launchd_plist.Plist):
Label = "MyPlist"
StartInterval = 1
Custom_key = "works"
@property
def StandardErrorPath(self):
return os.path.expanduser("~/Logs/LaunchAgents/%s/err.log" % self.Label)
>>> MyPlist().create('launchd.plist')
launchd.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Custom_key</key>
<string>works for Capitalized keys!</string>
<key>Label</key>
<string>MyPlist</string>
<key>StandardErrorPath</key>
<string>/Users/russianidiot/Logs/LaunchAgents/MyPlist/err.log</string>
<key>StartInterval</key>
<integer>1</integer>
</dict>
</plist>
Related projects
launchd-env
- launchd.plist environment variableslaunchd-exec
- execute script via launchdlaunchd-generator
- launchd.plist generatorlaunchd-logs
- launchd.plist logslaunchctl.py
-launchctl
python interfacelaunchd-plist.py
- launchd.plist class
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for launchd_plist-2019.3.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18768fbaf741e5a0357fe3f7f6d3db2010ee59f73da164cecff4c835cb78a614 |
|
MD5 | 4403bc7a7dd7bae1271e4655bb43aa93 |
|
BLAKE2b-256 | 40f53c0e4c910fa7e9e7cd898b07c29b5df193c0c2c04191df5e581a2b985759 |