I need to kill all python scripts except one. Unfortunattely, all scripts have similar name "pythonw.exe". Difference in PID only.
First time, i don't need to leave one script alive, thats why i just kill all python scripts in system by taskkill /F /T /IM "python*" command.
But now, i have one script, that automates all other scripts. The script is my simple "testing system". It rewrite object script, start, stop and restart.
But my problem is multithreading in objective script (10 - 20 threads).
I don't know, how to kill all python threads, except automates one.
P.S.
I tried to get tasklist and PID of automates script, and killed all scripts, except that one, but it doesn't work (i don't know why)
P.P.S
OS: Windows XP
Python 2.7.8
My solution is place testing code in exe file. Now i can kill all python scripts, as previously. Maybe someone will offer another solution?
Python kill scripts