New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[help][webbrowser always opens new tab. I want to open in the same tab] #77111
Comments
Dear manager, I'm just starting python and trying to make simple web application. #1st try
import webbrowser
url = 'www.google.com'
webbrowser.open(url, new=0) # this open new explorer window. #....wait #2nd try
webbrowser.open(url, new=0) # this open new explorer window again. In my test, I test 2nd argument from 0 to 2, but there seems no change. Is there any way to change address and open in the current opened browser window? best Regards, |
Hi Tommy, The documentation states "If new is 0, the url is opened in the same browser window if possible." It seems to be browser dependent, hence the 'if possible' caveat. What operating system and browser are you using? |
Hi Cheryl, I think you may misunderstand. Hi Tommy, It’s hard to say what is “the same tab”. |
TitanSnow, You're right, sorry about the confusion. But, nevertheless, this does seem to be something that the browsers don't have available as an option. Here's the Mozilla command line option page: Under the Browser section, there is a note stating: I believe the other browsers behave the same. |
Yes, I think so. Maybe, in a web application, to achieve this, |
I'm going to close this as third party since it's browser and not Python related. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: