subprocess.Popen

Keith Dart kdart at kdart.com
Mon Dec 13 01:31:25 CET 2004


Keith Dart wrote:
> 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?
> 
> 
> Probably because it is not entirely portable. If you want a more 
> complete, but Posix-only (at least Linux and FreeBSD), process 
> management and spawning then you can use the proctools module in pyNMS.
> 
> http://sourceforge.net/projects/pynms/
> 

I forgot to mention that the pyNMS package also has a module called 
"expect" that works like the Expect language. You can interact and 
control interactive processes and external CLIs with it.




-- 
                            \/ \/
                            (O O)
-- --------------------oOOo~(_)~oOOo----------------------------------------
Keith Dart <kdart at kdart.com>
vcard: <http://www.kdart.com/~kdart/kdart.vcf>
public key: ID: F3D288E4       URL: <http://www.kdart.com/~kdart/public.key>
============================================================================



More information about the Python-list mailing list