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

llanitedave llanitedave at veawb.coop
Mon Feb 25 03:26:52 CET 2013


On Sunday, February 24, 2013 3:51:09 PM UTC-8, Demian Brecht wrote:
> For the record, I completely misread and misunderstood the question. I
> 
> should stop posting that late at night :P
> 
> 
> 
> On Sun, Feb 24, 2013 at 1:25 AM, Demian Brecht <demianbrecht at gmail.com> wrote:
> 
> > Rather than using a relative path, try using
> 
> > webbrowser.open('{}/documentation/help.html'.format(os.path.dirname(__file__))).
> 
> >
> 
> > On Sun, Feb 24, 2013 at 1:17 AM, llanitedave <llanitedave at veawb.coop> wrote:
> 
> >> I created an html help page for my Python 2.7.3 application and put it in a documentation folder.  I used webbrowser.open() to fetch the page.
> 
> >>
> 
> >> On linux -- KDE specifically, the command opens the local file on my default browser with no issues.  However, on Windows 7, it opens Internet Explorer, which doesn't even search the local folder, but goes straight to the web and does a Google search, returning nothing but useless noise.
> 
> >>
> 
> >> My default browser on Windows is Chrome, so my intention is getting undermined right from the start.
> 
> >>
> 
> >> How do I get a local html file to open properly from Python in Windows?
> 
> >> --
> 
> >> http://mail.python.org/mailman/listinfo/python-list
> 
> >
> 
> >
> 
> >
> 
> > --
> 
> > Demian Brecht
> 
> > http://demianbrecht.github.com
> 
> 
> 
> 
> 
> 
> 
> --
> 
> Demian Brecht
> 
> http://demianbrecht.github.com

Well, between you and Chris, I think you've got me on the right track.  If things keep going like they are now, I should have it back under control in an hour or two.

So, thanks in advance for all of you!



More information about the Python-list mailing list