Skip to content

Instantly share code, notes, and snippets.

@kliph
Last active December 25, 2015 05:59
Show Gist options
  • Save kliph/6928915 to your computer and use it in GitHub Desktop.
Save kliph/6928915 to your computer and use it in GitHub Desktop.
Hacky method to open Mac OS X applications from the python command line
import os
os.system("open -a Microsoft\ PowerPoint") # For example.
os.system("open -a Preview ~/Desktop/printme.png") # And it works with
# file arguments
# too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment