os.system(cmd)
如果要把返回信息置入变量中:
textlist = os.popen(cmd)
例:
cmd = 'ps -ef ' textlist = os.popen(cmd).readlines() for line in textlist:

os.system(cmd)
如果要把返回信息置入变量中:
textlist = os.popen(cmd)
例:
cmd = 'ps -ef ' textlist = os.popen(cmd).readlines() for line in textlist: