user3755529
user3755529

Reputation: 1186

Python WebBrowser Open In Same Tab

running this line:

webbrowser.open(page.path, new=0, autoraise=True)

I always get the page opened in a new Tab.

How can I get it in the same Tab as it should be using new=0?

Upvotes: 13

Views: 2489

Answers (1)

츄 plus
츄 plus

Reputation: 514

This can't be done unfortunately.

You can set the variable to whatever you want but browser tab behaviour is hard-set in modern browsers and will override it. You'll find that you won't be able to use new=1 to open in a brand new window either, for the same reason. It will always just be a new tab.

The last update to the webbrowser module in the Github was about the same age as this question, I wonder if this has been abandoned.

Upvotes: 1

Related Questions