4

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 you for your help.

1
  • Which version of Internet Explorer? Have you tried webbrowser.open_new_tab()? The problem may be that the browser is opening the link via the default "link from external source" method. Commented Oct 4, 2011 at 18:18

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

doesnt work. i am using ie8. none of the commands work (ex. new=0,1,2) all are ignored

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.