Reputation: 31
import webbrowser
br=webbrowser.open('http://www.google.com/')
if br==True:
print"Success"
print"need to close the browser"
Upvotes: 0
Views: 304
Reputation: 101052
You can't.
But you can use the subprocess
module instead to open the browser and use the terminate
or kill
methods.
Upvotes: 2