title: How to close python window from script
body: <p>I am running a script in <code>python</code>, which interacts via <code>WebSockets</code> to an <code>HTML</code> page. When I close the <code>HTML</code> window, i send a command to python to finish all the processing. However, after that I would want it to close the window. I already tried <code>sys.exit(0)</code> but it only raises an error and stays open.</p>
  
  <p>Any ideas?</p>
  
  <p>Thank you</p>