[PEAK] peak lanuch and freebsd
Phillip J. Eby
pje at telecommunity.com
Tue Nov 2 07:02:16 EST 2004
At 09:33 PM 11/1/04 -0500, R. David Murray wrote:
>On Mon, 1 Nov 2004, Phillip J. Eby wrote:
> > It sounds to me like maybe Python is waiting for w3m to finish before it
> > starts the web server. The 'webbrowser' module just does the
> equivalent of:
> > os.system("w3m http://localhost:2854/")
> > So if 'w3m' doesn't fork off another process at that point, it's going to
> > be hosed in a way much like what you describe. Try setting:
> > BROWSER="w3m %s &"
> > and run peak launch. I think this might be needed for certain Unix
>The first way would not work for any of the unix browsers I have
>used (w3m, links, lynx, firefox), nor would I expect it to or, for
>that matter, want it to. Logically, if you expect the process the
>continue on and do some work, shouldn't you be forking that process?
Well, that's just how the Python 'webbrowser' module works. I suspect that
the reasoning partly has to do with whether the browser is graphical or
not. For Mozilla, KFM, Netscape, Grail, and Windows/Mac browsers, the
behavior is equivalent to a fork. It's only Mosaic, lynx, links, and w3m
that get launched synchronously.
I suppose that I could hack 'peak launch' to detect that 'webbrowser' is
running a "GenericBrowser" on Unix and attempt to fork(). I need to give
it some more thought, though.
More information about the PEAK