Python WebBrowser Open In Same Tab
Asked Answered
L

1

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?

Lytic answered 19/11, 2017 at 12:12 Comment(1)
Did you get any solution?Baroness
H
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.

Hartman answered 6/2, 2020 at 21:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.