13

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?

user3755529
  • 1,050
  • 1
  • 10
  • 30

1 Answers1

1

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.

츄 plus
  • 488
  • 1
  • 7
  • 20