Using Python, you can start and close programs on the Mac system by calling the AppleScript application provided by the Mac OS X system. Here is an example of a simple script that can help you do this: import subprocess
start the application
subprocess.call(['osascript','-e','tell application "AppName" to launch'])
close the application
subprocess.call(['osascript','-e','tell application "AppName" to quit'])