[Bf-committers] url handlers / help-system / *nix

Matt Ebb bf-committers@blender.org
Thu, 06 May 2004 10:46:23 +1000

Apparently this is very easy to do with the
Python webbrowser module. Check out this
thread on blender.org, where it's been
discussed already:



> Daniel Fairhead <madprof@uk2.net> wrote:
> Hi all,
> I've been thinking and looking into adding
documentation links from
> the
> help menu. A very simple project which I
should be able to do :-)
> All it has to do is launch the default
browser at either an online
> URL, or a
> html file on the system.
> As far as I have done so far, it is very
easy on windows (two/three
> lines (besides
> the blender events/menu code)). 
> Unfortunatly, other OSes (*NIX) don't have
an official standard way
> of knowing
> what the default browser is.
> http://www.catb.org/~esr/BROWSER/
> seems like a Good Solution, using a
$BROWSER environment variable and
> then 
> needs only 3 lines again. I do not know how
many distros/systems
> support this by default
> though.
> I have also found a way of finding out the
gnome http URL handler
> using gconf. The
> code to do this though is quite ugly and
large (20+ lines). I could
> also write some 
> semi-smart code which goes searching in
common places for common
> browsers, and call 
> them... but this is also very in-elegant.
> I could also add a user-pref for which
browser, but this seems far
> far over the top,
> ugly, and silly. I really dislike this though.
> So, should I just do the $BROWSER one (my
prefered) and if $BROWSER
> isn't set 
> pop up a message saying "please set your
$BROWSER variable for Help
> to work...", 
> or should I write loads of ugly hacky code
to try and find clever
> defaults to use
> if $BROWSER isn't set?
> Sorry if this seems trivial...
> Dan
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org