Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open an application in Mac OS using Python

I want to open an application like TextEdit or Firefox in Mac OS using Python and wait till the applications exits. I can't figure out exact command to open an app and wait.

like image 632
Bharath Avatar asked Mar 04 '15 01:03

Bharath


Video Answer


1 Answers

You can open any application like this example

import os

os.system("open /Applications/Google\ Chrome.app")
os.system("open /Applications/Todoist.app")
os.system("open /Applications/WhatsApp.app")
like image 192
Arthur Correa Avatar answered Sep 17 '22 15:09

Arthur Correa