Sep-04-2020, 07:30 PM
If you want to launch an app and wait for the user to exit, you could use /usr/bin/open and subprocess.run. If you want to continue the program after launching, could use subprocess.Popen.
>>> import subprocess >>> subprocess.run(["/usr/bin/open", "-a", "calendar"]) # waits until calendar exit CompletedProcess(args=['/usr/bin/open', '-a', 'calendar'], returncode=0) >>> subprocess.Popen(["/usr/bin/open", "-a", "calendar"]) # returns immediately <subprocess.Popen object at 0x1065e3048>I'm not sure if there's a more direct interface that avoids /usr/bin/open.