插入shell

https://www.jianshu.com/p/5d999a668e79


import subprocess
print subprocess.call("service apache2 status", shell=True)

import os
print os.system("service apache2 status")
原文地址:https://www.cnblogs.com/morganh/p/12859739.html