摘要:
#-*- encoding:UTF-8 -*-import osimport sysimport string import psutilimport redef get_pid(name): process_list = psutil.get_process_list() regex = "pid=(\d+),\sname=\'" + name + "\'" print regex pid = 0 for line in process_list: process_info = str(line) ini_regex = re.comp 阅读全文