Running and killing a process in python

James Mills prologic at shortcircuit.net.au
Tue May 3 22:31:06 EDT 2011


On Wed, May 4, 2011 at 10:45 AM, Astan Chee <astan.chee at gmail.com> wrote:
> Hi,
> I'm trying to make a python script (in windows 7 x64 using python 2.5) to
> start a process, and kill it after x minutes/seconds and kill all the
> descendants of it.
> Whats the best way of doing this in python? which module is best suited to
> do this? subprocess?

Yes start with the subprocess module:

http://docs.python.org/library/subprocess.html

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"



More information about the Python-list mailing list