[Python-Dev] webbrowser.py: browser >/dev/null 2>&1
phd at mail2.phd.pp.ru
Thu Mar 24 13:25:03 CET 2005
On Wed, Mar 23, 2005 at 06:39:41PM -0500, Fred L. Drake, Jr. wrote:
> On Wednesday 23 March 2005 07:40, Oleg Broytmann wrote:
> > While I'm working on webbrowser... Why do all graphical browsers are
> > called with their stdout/stderr redirected to /dev/null? Do we really
> > need to hide problems from the user? Browsers are usually silent beasts
> > - they interact with the user using windows, not stdio.
> I don't remember why I did that
I found one reason. For browsers that support remote commands the
module runs two command - one to try to run the remote command, and
another to run the browser in non-remote mode if the first command fails
(there is no remote browser). If the remote command fails it reports the
problem on stderr, but that's not an error from the module point of
view, so the module hides it. But for the second command - browser + URL in
non-remote mode - the module should not hide errors. I'll fix that.
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-Dev