webrowser and linux (also os.execv)

Tim Newsham newsham at lava.net
Fri Jun 11 02:37:11 CEST 2004

On redhat8 with Python 2.3.4:

    import webbrowser

opens a browser (if not yet open) but fails to redirect it.  Another
window of mine receives an error message:

    channel 4: open failed: connect failed: Connection refused

The browser is the stock Mozilla browser that came with the
system.  The same command works flawlessly under windows.

Any idea where the problem lies?  I would like to get this
working in short order if possible (I can rebuild the python
package if necessary).

Oh, on an unrelated note, the os.execv and os.execve functions
do not allow an empty argv to be passed in, even though the
underlying C/Unix primitives do.  Although it is rare that
one would want to pass in an empty argv (with argc set to zero)
there are rare situations when this is desired.  The fact
that python tries to protect the user from making a mistake
by limiting the flexibility of the API is a deficiency.

Tim N.

More information about the Python-list mailing list