Re: [Tutor] Getting info about processes via pid

2005-10-13 Thread Dwyer, Michael
ied by pid. THANX(MKD). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of lawrence wang Sent: Thursday, October 13, 2005 10:30 AM To: tutor@python.org Subject: [Tutor] Getting info about processes via pid So I have a list of pids, and I want to check whether the

[Tutor] Getting info about processes via pid

2005-10-13 Thread lawrence wang
So I have a list of pids, and I want to check whether the pids still refer to live processes or not. Currently I'm doing that thus: pids = ['4550\n', ...] procs = os.popen("ps ax|grep %s|awk '{ print $1 }'" % keyword).readlines() and comparing the two lists. I'm wondering, though, if there's a wa