subprocess.Popen
P at draigBrady.com
P at draigBrady.com
Mon Dec 13 12:21:31 EST 2004
Michele Simionato wrote:
> I was looking at Python 2.4 subprocess.Popen. Quite nice and handy, but I
> wonder why a "kill" method is missing. I am just adding it via subclassing,
>
> class Popen(subprocess.Popen):
> def kill(self, signal = SIGTERM):
> os.kill(self.pid, signal)
>
> but I would prefer to have it in the standard Popen class. I am surprised
> it is not there. Any comments?
Seems like an ommission, but probably due
to windows implementation problems?
Note my subprocess.py that was referenced
in pep 324 does have a kill method:
http://www.pixelbeat.org/libs/subProcess.py
Note also that it also kills any children
of the subProcess using process groups.
--
Pádraig Brady - http://www.pixelbeat.org
--
More information about the Python-list
mailing list