Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a simple python script for manipulating a plist file. Once this file is updated, I'd like to have that same script unload and then load that plist file in launchd. Normally, I'd use launchctl from the command line to do it. I could still do that in the script with the system (or subprocess, if I'm feeling more Python-correct) function, but I was wondering if there's a more "correct" way of doing it via any of the Apple OS X APIs, frameworks, etc. Any ideas or at least pointers of where to look?

FWIW, this is what I'm trying to script up to be sent out to client laptops. It's fairly trivial, but I'm trying to learn more about scripting sysadmin tasks in OS X.

Thanks!

share|improve this question
add comment

1 Answer

I created a little pythonic wrapper which can be found on github: https://github.com/infothrill/python-launchd It has a little README that should get you started.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.