python-执行shell命令
def runShell(cmd):
try:
(status, output) = commands.getstatusoutput(cmd)
except Exception, e:
return (1, "")
# write shell and shell's result into shelllog
return status, output
ฅ平平庸庸的普通人ฅ
def runShell(cmd):
try:
(status, output) = commands.getstatusoutput(cmd)
except Exception, e:
return (1, "")
# write shell and shell's result into shelllog
return status, output