Beginner asks question about Python on Linux

Adrian Eyre a.eyre at optichrome.com
Fri Oct 8 06:58:00 EDT 1999


> os.system("ps aux|grep someProcess > pids.temp")

Try:
f = os.popen("ps aux|grep " + someProcessStr)
l = f.readlines()
f.close()

--------------------------------------------
Adrian Eyre <mailto:a.eyre at optichrome.com>
Optichrome Computer Solutions Ltd
Maybury Road, Woking, Surrey, GU21 5HX, UK
Tel: +44 1483 740 233  Fax: +44 1483 760 644
http://www.optichrome.com 
--------------------------------------------





More information about the Python-list mailing list