Created
July 27, 2017 12:19
-
-
Save atifazad/72cce0c3828f80f99368504f7cb1b270 to your computer and use it in GitHub Desktop.
Python script to shutdown mac
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
# -*- coding: utf-8 -*- | |
import subprocess | |
subprocess.call(['osascript', '-e', 'tell app "loginwindow" to «event aevtrsdn»']) | |
#usage: > python mac_shutdown.py | |
# For further similar system commands: https://gist.github.com/atifazad/6afd3cbedb8819dd7ed7be92dec2dc0d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you explain what's written in the subprocess.call function about?