result = os.popen('ps aux') res = result.read() for line in res.splitlines(): print line 原帖地址:http://blog.csdn.net/nextdoor6/article/details/51283117