2016-09-06 275 views

回答

0

在OSX你可以使用這樣的事情:

腳本內容:

#!/bin/bash 

osascript -e 'tell app "Terminal" 
    do script "ls" 
end tell' 

,並從Python腳本中調用它:

subprocess.call("/path/to/script.sh")