[Pythonmac-SIG] workaround for webbrowser bug

Russell E Owen owen@astro.washington.edu
Fri, 20 Dec 2002 08:38:54 -0800


I earlier reported the bug that the webbrowser module cannot reliably 
be used to open html files on the local computer (file:// links) in a 
browser. The files's creator is used to open the file (instead of the 
user's default web browser) and anchors are ignored.

I've since learned a few useful things:
- This is a known bug in MacOS X. That doesn't mean they'll fix it, 
but at least it has a tracking number.
- The problem of opening the file with the wrong application is easy 
to work around: simply delete the file creator and type (using XRay 
or any such program). Then the default web browser is used to open 
the file. If you're used to double-clicking the file to edit it, this 
is a bit of a pain, but it's much better than nothing.

To work around the anchor problem, I ended up using fairly small html 
files. Thus on the Mac version of my application help doesn't work 
quite as well as it might, but it still is reasonable.

-- Russell