how to run my own external command in python script
This question already has an answer here:
你可以使用subprocess.Popen来达到这个目的:
import shlex
import subprocess
proc = subprocess.Popen(shlex.split('sudo insteon on 23'))
proc.communicate()
链接地址: http://www.djcxy.com/p/13512.html
上一篇: 哪个是执行命令的最佳python模块