[Tutor] XP & catching execl o/p ?
Tim Golden
Tim.Golden at viacom-outdoor.co.uk
Wed Dec 6 09:48:05 CET 2006
| Struggling with python & XP again. My app needs to know if a
| certain program is running on my XP box
As a complete alternative, consider using WMI:
<code - UNTESTED>
import os, sys
import wmi
c = wmi.WMI ()
for process in c.Win32_Process (Name="excel.exe"):
print "Excel is running"
break
else:
print "Excel is not running"
</code>
(Uses: http://timgolden.me.uk/python/wmi.html)
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Tutor
mailing list