I'm running Windows with Mozilla (version 1.4) as my default web browser. When I call webbrowser.open_new() using Python 2.3 it opens the url in an existing window (if there are any) rather than opening a new one like it's supposed to. This might in some way be an interaction with tabbed browsing, since I always have a bunch of tabs open.
Logged In: YES user_id=11375 It's invoking Mozilla with -remote "openURL(http://example.com, new-window)". According to http://www.mozilla.org/unix/remote.html, this should create a new window. Try to run this command yourself and set if it opens a new tab; if it does, this is a Mozilla bug (or perhaps a feature?).
Logged In: YES user_id=52561 This is very bizzare. When I execute this command - C:\>"Program Files\mozilla.org\Mozilla\mozilla.exe" -remote "openURL(http://www.bitconjurer.org/, new-window)" it opens a new browser window with no page open in it. Are you sure it's executing the command you said?
Logged In: YES user_id=11375 Looking at the code. this is what webbrowser.py should be doing. I can't debug this problem, because I'm not seeing it on my Linux box with Mozilla 1.4. I suggest you make a copy of webbrowser.py and insert debugging prints into it. Is it instantiating the Netscape class, as I expect? And what arguments is it really using?
Logged In: YES user_id=11105 I can confirm (and possibly explain) everything that Bram reports. 1. The '-remote' switch on the command line for mozilla only works on Unix/Linux, as documented in http://www.mozilla.org/docs/command-line-args.html. So executing the command line "Program Files\mozilla.org\Mozilla\mozilla.exe" - remote "openURL(...)" doesn't load this url, it only starts mozilla. 2. webbrowser.py on Windows (for me at least) doesn't instantiate the Netscape class - it uses WindowsDefault, which simply uses startfile(url). So, the 'new' and 'autoraise' arguments are not even used. Looking at the docs for the webbrowser module, the words 'if possible' are used very often. So it seems, it simply is not possible on windows. (The only thing which should be fixed in the docs is that the win32api and win32con modules are mentioned, but they are not used in the code - so this should be removed IMO). I suggest to close the bug if noone comes up with a patch.