[Python-Dev] webbrowser.py: browser >/dev/null 2>&1
gward at python.net
Thu Mar 24 01:53:52 CET 2005
On 23 March 2005, Oleg Broytmann said:
> I'd like to remove all those redirects. Any opinion?
+0.5. The beauty of Python is that it generally provides thin
wrappers: when writing a convenient wrapper, it's OK to expose the
underlying beast, warts and all.
(I had a minor epiphany about this recently when digging into
ossaudiodev again: turns out that certain ioctls are implemented subtly
differently in OSS and in ALSA's OSS emulation layer. ossaudiodev, as
it turns out, faithfully mirrors this inconsistency to Python
programmers. The inconsistency is not ossaudiodev's fault, so it's not
ossaudiodev's problem to fix it. Python programmers should have access
to everything that C programmers have access to, only with less typing.
If that means they have to worry about Mozilla dumping lots of text to
stdout, or ALSA implementing certain ioctls differently than OSS, so be
(But, oh yeah: +1 to Fred's suggestion of making redirection
controllable. Something like this: default should be no redirection,
programmer should be allowed to specify what to do with stdout/stderr of
Greg Ward <gward at python.net> http://www.gerg.ca/
If at first you don't succeed, give up--no use making a damn fool of yourself.
More information about the Python-Dev