title: How to kill a process in window without killing current process
body: <p>Hello I just wont to kill a process without killing current process suppose that i have a python code which write a string in txt file e.g</p>
  
  <pre><code>import os
  while True:
      with open('input.txt' , 'r') as re:
          all_data = re.read()
      if all_data == 'pause':
          os.system('kill.bat')
      else:
          print("\nContinue\n")
  </code></pre>
  
  <p>here it will read input.txt and if it is equal to pause then it will run kill.bat here i would like to restart this code for doing this i will write another script kill.bat which restart this code but the problem is it is not restarting because it was killing kill.bat file but i wont to kill only python terminal and restart it how can i do it here is kill.bat file code </p>
  
  <pre><code>taskkill /IM cmd.exe
  python main.py
  
  </code></pre>
  
  <p>main.py is my python file</p>