How can I open URLs in an existing browser window with the webbrowser module?
I’m using the webbrowser Python module to open images in Internet Explorer. Specifically, I’m using the webbrowser.open('C:...', new=0)
command.
However, even though I say new=0
my URL is always opened in a new browser window.
What can I do so my link is opened in an already-open browser window?
Thank开发者_如何学Python you for your help.
Try open_new_tab.
webbrowser.open_new_tab(url)
Open url in a new page (“tab”) of the default browser, if possible, otherwise equivalent to open_new().
From the docs: http://docs.python.org/library/webbrowser.html
精彩评论