sip_xxx
sip_xxx

Reputation: 31

How to kill the default browser process that was opened using webrowser() in python

import webbrowser

br=webbrowser.open('http://www.google.com/')
if br==True:
   print"Success"
   print"need to close the browser"

Upvotes: 0

Views: 304

Answers (1)

sloth
sloth

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

Related Questions