title: Python - How to close a port left open?
body: <p>I have a process which at times is opening a port and then not closing it (I'm on Windows 10).</p>
  
  <p>What is the best way to close this via Python? The port number is 1300 and will not change.</p>
  
  <p>I know this can be done manually via command line by killing the PID, however I would like to keep it all in one easy to use batch file. </p>