Re: starting and stopping a program from inside a python script

2006-07-04 Thread Amit Khemka
You can store the pid of the process when started and later use it to kill it. cheers, On 3 Jul 2006 15:28:19 -0700, dfaber <[EMAIL PROTECTED]> wrote: > Aloha! > I want to terminate a process/program from within a python script. > > For example, > if I have a program say foo.sh that starts runni

starting and stopping a program from inside a python script

2006-07-03 Thread dfaber
Aloha! I want to terminate a process/program from within a python script. For example, if I have a program say foo.sh that starts running, then I can run it from within a python script using os.popen('foo.sh') which starts a program/process say 'bar' At some point later, I want to kill 'bar'. C