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?
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?
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.
© 2022 - 2024 — McMap. All rights reserved.