[New-bugs-announce] [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab]

Tommy report at bugs.python.org
Fri Feb 23 21:17:13 EST 2018


New submission from Tommy <tommylim1018 at naver.com>:

Dear manager,

I'm just starting python and trying to make simple web application.
As above title, I just want to open webbrowser at first and then just change web-address in the same tab, but whenever I try webbrowser.open, it always open new tab or new window.
When I checked webbrowser-control options on python help page, it says webbrowser.open's 2nd argument can control window opening. but it did not work well in my tries. following is my test code.

#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.
always opens new tab.

Is there any way to change address and open in the current opened browser window?

best Regards,
Tommy

----------
components: Windows
messages: 312689
nosy: paul.moore, steve.dower, tim.golden, tommylim1018 at naver.com, zach.ware
priority: normal
severity: normal
status: open
title: [help][webbrowser always opens new tab. I want to open in the same tab]
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32930>
_______________________________________


More information about the New-bugs-announce mailing list