On Wednesday 06 December 2006 08:48, Tim Golden wrote: > | 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
Just looked at WMI - didn't know it existed ! Am going down the subprocess route first as its 'built in'. If that does not work - hello WMI Cheers Dave > > ________________________________________________________________________ > 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 > ________________________________________________________________________ > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor