[Python]代码
import psutil import re import sys def processinfo(x): p = psutil.get_process_list() for r in p: aa = str(r) f = re.compile(x,re.I) if f.search(aa): # print aa.split('pid=')[1].split(',')[0] print aa.split('pid=') processinfo(sys.argv[1])
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/8078.html