Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '*not*': 0.07; 'bug.': 0.07; 'interpreted': 0.07; 'interpreter.': 0.07; 'override': 0.07; 'problem:': 0.07; 'subject:Windows': 0.09; 'python': 0.09; '"if': 0.09; "'''": 0.09; '*is*': 0.09; 'behavior,': 0.09; 'exists,': 0.09; 'imported': 0.09; 'open()': 0.09; 'path,': 0.09; 'path.': 0.09; 'terry': 0.09; 'to:addr:comp.lang.python': 0.09; 'windows,': 0.09; 'cc:addr:python-list': 0.10; '(but': 0.15; '*this*': 0.16; '24,': 0.16; '4:35': 0.16; 'bug,': 0.16; 'invalid.': 0.16; 'new=0,': 0.16; 'reedy': 0.16; 'rejects': 0.16; 'succeeded.': 0.16; 'tempted': 0.16; 'which,': 0.16; 'win7': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'certainly': 0.17; 'instance': 0.17; 'issue,': 0.17; '(in': 0.18; 'jan': 0.18; 'code,': 0.18; 'windows': 0.19; 'variable': 0.20; 'issue.': 0.20; 'bit': 0.21; 'doc': 0.22; 'cc:2**0': 0.23; 'absolute': 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'so.': 0.24; 'url:bugs': 0.24; 'linux': 0.24; 'machine': 0.24; 'pass': 0.25; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'am,': 0.27; 'separate': 0.27; 'displays': 0.27; 'strongly': 0.27; 'subject:skip:d 10': 0.27; 'rest': 0.28; 'subject:/': 0.28; 'chris': 0.28; 'environment': 0.29; 'implied': 0.29; 'workaround': 0.29; 'case,': 0.29; 'starts': 0.29; "i'm": 0.29; 'maybe': 0.29; 'relative': 0.30; 'error': 0.30; 'sense': 0.31; 'url:python': 0.32; 'not.': 0.32; 'says': 0.33; 'agree': 0.34; 'received:google.com': 0.34; 'list': 0.35; 'needed': 0.35; 'open': 0.35; 'received:209.85': 0.35; 'next': 0.35; 'but': 0.36; 'wanted': 0.36; 'url:org': 0.36; 'depends': 0.36; 'loaded': 0.36; 'should': 0.36; 'display': 0.36; 'turn': 0.36; 'available.': 0.37; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'help': 0.40; 'your': 0.60; 'most': 0.61; 'telling': 0.61; 'first': 0.61; 'close': 0.63; 'necessarily': 0.63; 'information': 0.63; 'more': 0.63; 'today,': 0.64; 'behavior': 0.64; 'here': 0.65; 'taking': 0.65; 'box.': 0.65; 'explorer': 0.65; 'learned': 0.65; 'webpage': 0.65; 'today': 0.67; 'analysis': 0.70; 'internet': 0.71; 'sounds': 0.71; 'browser.': 0.81; '2013': 0.84; 'believe,': 0.84; 'machine!': 0.84; 'approach.': 0.91; 'frustrating': 0.91; 'convinced': 0.93; 'have.': 0.95; 'hand,': 0.97 X-Received: by 10.50.53.166 with SMTP id c6mr625146igp.12.1361773567343; Sun, 24 Feb 2013 22:26:07 -0800 (PST) Newsgroups: comp.lang.python Date: Sun, 24 Feb 2013 22:26:06 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=99.162.129.213; posting-account=aw7wEQoAAACnaP8vftI9MyiC9NfXNJyr References: <659b4770-12fb-400f-8aa5-049605347fe2@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 99.162.129.213 MIME-Version: 1.0 Subject: Re: webbrowser.open("./documentation/help.html")-- No Go in Windows From: llanitedave To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 107 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361774212 news.xs4all.nl 6899 [2001:888:2000:d::a6]:60245 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39879 On Sunday, February 24, 2013 9:35:17 PM UTC-8, Terry Reedy wrote: > On 2/24/2013 4:35 AM, Chris Rebert wrote: > > > > > Sounds like this might be your problem: > > > http://bugs.python.org/issue8936 > > > > I just closed that issue an invalid. Here is most of what I wrote. > > ''' > > After reading the doc and the code, I am convinced that current behavior > > is close to the implied wanted behavior, and that it is not a bug. > > > > The doc says > > webbrowser.open(url, new=0, autoraise=True) > > Display url using the default browser. > > > > What does 'default browswer' mean? Near the top, the doc says "If the > > environment variable BROWSER exists, it is interpreted to override the > > platform default list of browsers,". So the 'default browser' is > > actually the 'default browser list'. What open() does is to try each in > > turn and stop when one says it succeeded. So the doc should say 'using > > the first default browser that claims to succeed.' > > > > What does 'default browser list' mean? It depends on the platform *and* > > the software loaded on the particular machine when webbrowser is first > > imported in a particular instance of the interpreter. The 'platform' > > part is in the quote above, the rest is not. I will open a separate doc > > issue. > > > > On Windows, the list starts with 'default Windows browser', which calls > > os.startfile(), which, I believe, does call the user default browser. > > Next is Internet Explorer -- if available at that time on the particular > > machine! If the user-default browser rejects the url, then IE is tried. > > > > On my win7 machine today, I have Firefox the default and IE available. > > Firefox rejects 127.0.0.1:8080 with an 'Unable to connect' error box. IE > > 'accepts' it in the sense that it displays an information starting 'The > > webpage cannot be displayed'. > > ''' > > > > For *this* issue, I strongly suspect that Chrome is rejecting the > > invalid URL and telling Python so. So IE is tried next (but not first). > > > > > The fix would seem to be ensuring that the URL you pass includes the > > > scheme (in your case, "file:"). > > > > so that Chrome does not return an error code, in which case IE should > > *not* be tried as a backup. > > > > -- > > Terry Jan Reedy Terry, after what I've learned today I'm tempted to agree that it's not necessarily a bug, and that maybe all that's needed is a bit more clarity in the documentation. On the other hand, it *is* a bit frustrating that Linux recognizes an html-style relative path, while Windows insists on the entire absolute path. Maybe we can call it a Windows bug, but a workaround would be nice to have. However, combined with os.path.abspath(), it's not a huge issue -- once we understand the approach. I certainly appreciate your taking the time to make an analysis of it, and someday I hope to have the time and skills to help out in some small way.