Reputation:
I am trying to make a program that will automatically close a web tab or the Web browser. :/
Upvotes: 0
Views: 5681
Reputation: 25999
Depends on what you want but you can try to kill the process(assuming your running windows, here's a sample)
import os
os.system("taskkill /F /IM chrome.exe")
I have read that you maybe able to use browser.py or subproceses to do this also.
Upvotes: 2