返回shell的输出(不管标准输出或是错误输出) import commands line = commands.getstatusoutput(shellcommand) line = line[1]