python 调用sh文件

import os
cmd = "./test.sh"
#os.system(cmd)
data = os.popen(cmd)
print data.read()

你可能感兴趣的:(python 调用sh文件)