Answers for "how to run python code on mac"

2

install python in mac

brew install python3
brew install python2
Posted by: Guest on June-06-2020
0

how to make python open an application on mac

import os
os.system("""osascript -e 'tell app "Safari" to open'""")
Posted by: Guest on August-20-2020
0

how to run mac terminal from python script

from applescript import tell

#set what command you want to run here
yourCommand = 'ls'

tell.app( 'Terminal', 'do script "' + yourCommand + '"')
Posted by: Guest on June-30-2020

Python Answers by Framework

Browse Popular Code Answers by Language