subprocess.Popen - terminate

py codecraig at gmail.com
Tue Nov 15 20:29:00 CET 2005


I am using subprocess.Popen to execute an executable, how can I
terminate that process when I want?

for example (on windows)

p = subprocess.Popen("calc.exe")
....

now say I want to kill calc.exe ...how can I do it?  By the way, I am
not looking for a windows only solution I need something that is
universal (mac, *nix, etc)

thanks




More information about the Python-list mailing list