[Tutor] Stopping a shell process started with system()

Sean Q. Hendricks shendric at uga.edu
Wed Sep 21 21:00:10 CEST 2005


Hi all,

I'm trying to write a simple front end for a commandline application 
(some of the people I'm working with get the shakes if they have to use 
the commandline) in Windows.  I was using os.system() to execute a 
command, and that works fine, but the only way I know to stop the 
external program is to hit CTRL-C.  On *nix, as I understand it, you 
could create a Popen3 class instance, which would have the pid as a 
property of the class, which can be used to call a kill on that pid to 
stop the program.  But, indications are that this is not available for 
Windows, so I'm wondering if there is a better option than os.system() 
or if there is just something I'm missing.  Any help would be 
appreciated.  I'm using Python 2.3 on Win 2k.

Sean

-- 
***Please note new email address: shendric at uga.edu***



More information about the Tutor mailing list