Terminate a python script from linux shell / bash script

Piet van Oostrum piet at cs.uu.nl
Thu Jul 10 04:42:18 EDT 2008


>>>>> Gros Bedo <gros_bedo at hotmail.com> (GB) wrote:

>GB> I have a question about Python and Linux shell. I have a python
>GB> program which is permanently resident in the end-user system. I'm
>GB> currently producing a RPM package, and it works nicely. The problem is
>GB> that when I uninstall it, my program keeps running in the background,
>GB> even if the files are deleted.

>GB> I know I can terminate python shell directly, but this is not a good
>GB> idea because the end-user may be working with another important python
>GB> application, and would be very angry if mine would close everything
>GB> that is using python shell.

That's not how it works. If you kill one running python script it will not
effect other python scripts. Each script has its own interpreter process
running. 

>GB> So, is there a way from the Linux shell or a bash script to terminate
>GB> just one specific Python script ? 

So just kill it.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list