Created
July 27, 2017 11:19
-
-
Save atifazad/a224a4a64821138cfbf8cedbe6afbf52 to your computer and use it in GitHub Desktop.
Python script to close mac apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
if len(sys.argv) == 1 : | |
print "missing program name to quit" | |
else: | |
program=sys.argv[1] | |
quitCommand='tell application "' + program + '" to quit' | |
print "quiting " + program | |
subprocess.call(['osascript', '-e', quitCommand]) | |
#usage: > python quit.py Skype |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment