Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39804

Re: webbrowser.open("./documentation/help.html")-- No Go in Windows

Path csiph.com!usenet.pasdenom.info!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'essentially': 0.04; 'paths': 0.05; 'problem:': 0.07; 'subject:Windows': 0.09; 'python': 0.09; 'argument,': 0.09; 'path.': 0.09; 'snippet': 0.09; 'bug': 0.10; '24,': 0.16; 'bug,': 0.16; 'chris,': 0.16; 'downside': 0.16; 'fatal': 0.16; 'folder.': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'guess.': 0.16; 'holy': 0.16; 'illustrates': 0.16; 'least,': 0.16; 'menu.': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'pathname': 0.16; 'plus,': 0.16; 'variable.': 0.16; 'wxpython': 0.16; 'wrote:': 0.17; 'fix': 0.17; '(in': 0.18; '(or': 0.18; 'code.': 0.20; 'versions': 0.20; 'trying': 0.21; 'browsers': 0.22; 'absolute': 0.23; "i've": 0.23; 'feature': 0.24; 'url:bugs': 0.24; 'pass': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'css': 0.27; 'subject:skip:d 10': 0.27; "doesn't": 0.28; 'subject:/': 0.28; 'chris': 0.28; 'environment': 0.29; 'case,': 0.29; 'relative': 0.30; 'url:python': 0.32; "aren't": 0.33; 'handle': 0.33; 'to:addr :python-list': 0.33; "can't": 0.34; 'path': 0.35; 'open': 0.35; 'something': 0.35; 'really': 0.36; 'but': 0.36; 'url:org': 0.36; 'method': 0.36; 'should': 0.36; 'two': 0.37; 'subject:: ': 0.38; 'brief': 0.38; 'there,': 0.38; 'page': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'called': 0.39; 'list,': 0.39; 'application': 0.40; 'received:192.168': 0.40; 'help': 0.40; 'your': 0.60; 'gave': 0.65; 'header:Reply-To:1': 0.68; 'computers': 0.69; 'internet': 0.71; 'obvious': 0.71; 'sounds': 0.71; 'reply-to:no real name:2**0': 0.72; 'assurance': 0.74; '2013': 0.84; 'browsers,': 0.84; 'language!': 0.84; 'reply- to:addr:python.org': 0.84; 'sheet': 0.93
X-CM-Score 0.00
X-CNFS-Analysis v=2.0 cv=XeZXOvF5 c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=_vX2mLoUpDQA:10 a=Hw3Zd1L1gb0A:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=atoa2O84ne8A:10 a=TK8x5YedPQYBa2EuDugA:9 a=wPNLvfGTeEIA:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117
X-AUTH mrabarnett:2500
Date Sun, 24 Feb 2013 22:15:10 +0000
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130215 Thunderbird/17.0.3
MIME-Version 1.0
To python-list@python.org
Subject Re: webbrowser.open("./documentation/help.html")-- No Go in Windows
References <659b4770-12fb-400f-8aa5-049605347fe2@googlegroups.com> <mailman.2401.1361698540.2939.python-list@python.org> <5fbb36fe-a2b3-4ea6-a42e-53d46845865e@googlegroups.com>
In-Reply-To <5fbb36fe-a2b3-4ea6-a42e-53d46845865e@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2445.1361744102.2939.python-list@python.org> (permalink)
Lines 40
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361744102 news.xs4all.nl 6850 [2001:888:2000:d::a6]:55494
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39804

Show key headers only | View raw


On 2013-02-24 20:28, llanitedave wrote:
> On Sunday, February 24, 2013 1:35:31 AM UTC-8, Chris Rebert wrote:
[snip]
>> Sounds like this might be your problem:
>>
>> http://bugs.python.org/issue8936
>>
>> The fix would seem to be ensuring that the URL you pass includes
>> the scheme (in your case, "file:").
>>
> Holy Toledo!  That's a two-year-old bug spanning two versions of the
> language!
>
> BTW, Chris, the snippet I showed in the title essentially WAS the
> exact code.  It's a method with that single line called from a
> wxPython Help menu.  I can't really put an absolute pathname into the
> argument, because the application is going to be distributed to a
> variety of computers at my workplace, and there's no assurance that
> it will go into (or remain in)a particular folder.
>
> I was trying to avoid using the wx.html.HtmlWindow feature of
> wxPython, because it doesn't handle CSS and styles.  My help page is
> the portal to a multi-page users guide with a style sheet to render
> all the content consistently.
>
> Plus, I couldn't get the wx.html.HtmlWindow to open relative paths
> either -- it gave me "URL Malformed" messages even in KDE, when
> webbrowser.open("filepath") was working for the exact same path.  But
> that's something to take up on the wxPython list, I guess.
>
> This to me illustrates the downside of the Python philosophy of
> "There should be only one obvious way to do things".  If that one
> obvious way has a fatal bug, you're pretty much SOL.
>
I've had a brief look at webbrowser.py. It's looking for the browsers in 
the paths listed in the PATH environment variable.

On my PC at least, the paths to the other browsers, such as "C:\Program
Files\Mozilla Firefox" for Firefox, aren't listed there, hence the only
one it can find is Internet Explorer.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

webbrowser.open("./documentation/help.html")--  No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 01:17 -0800
  Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Chris Rebert <clp2@rebertia.com> - 2013-02-24 01:24 -0800
  Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Demian Brecht <demianbrecht@gmail.com> - 2013-02-24 01:25 -0800
  Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Chris Rebert <clp2@rebertia.com> - 2013-02-24 01:35 -0800
    Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 12:28 -0800
      Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-24 20:50 +0000
        Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 13:06 -0800
        Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 13:06 -0800
      Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Chris Rebert <clp2@rebertia.com> - 2013-02-24 12:48 -0800
        Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 13:04 -0800
        Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 13:04 -0800
      Re: webbrowser.open("./documentation/help.html")-- No Go in Windows MRAB <python@mrabarnett.plus.com> - 2013-02-24 22:15 +0000
        Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 17:03 -0800
        Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 17:03 -0800
      Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Terry Reedy <tjreedy@udel.edu> - 2013-02-25 00:36 -0500
    Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 12:28 -0800
  Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Demian Brecht <demianbrecht@gmail.com> - 2013-02-24 15:51 -0800
    Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 18:26 -0800
    Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 18:26 -0800
  Re: webbrowser.open("./documentation/help.html")--  No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 19:37 -0800
    Re: webbrowser.open("./documentation/help.html")--  No Go in Windows Matej Cepl <mcepl@redhat.com> - 2013-02-26 14:15 +0100
  Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Terry Reedy <tjreedy@udel.edu> - 2013-02-25 00:35 -0500
    Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 22:26 -0800
      Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Chris Angelico <rosuav@gmail.com> - 2013-02-25 17:37 +1100
      Re: webbrowser.open("./documentation/help.html")-- No Go in Windows Terry Reedy <tjreedy@udel.edu> - 2013-02-25 06:10 -0500
    Re: webbrowser.open("./documentation/help.html")-- No Go in Windows llanitedave <llanitedave@veawb.coop> - 2013-02-24 22:26 -0800

csiph-web