2016-09-06 152 views

回答

0

在OSX你可以使用这样的事情:

脚本内容:

#!/bin/bash 

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

,并从Python脚本中调用它:

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