Akira Li added the comment: open(url, stdout=DEVNULL) won't work on Windows (os.startfile()) and OS X (AppleScript) by default.
UnixBrowser already suppresses the output when it is safe, if self.redirect_stdout=True and self.background=True are set. Also, open(url, stdout=DEVNULL) would probably break text-browsers such as elinks (e.g., they are run when $DISPLAY environment variable is not set). What left: Unix browsers for which webbrowser doesn't think that it is safe to suppress the output. If webbrowser allows the output when it shouldn't then it could be fixed on case by case basis and/or maybe some mechanism could be provided to override the webbrowser choice e.g., BaseBrowser.suppress_output attribute that defaults to None (let webbrowser decide). webbrowser is a high-level interface; stdout/stderr from subprocess are too low-level for open() function (inventing your own stdout/stderr values is even worse). ---------- nosy: +akira _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22277> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com