This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author CristianCantoro
Recipients CristianCantoro
Date 2014-08-26.13:06:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409058396.11.0.385358825237.issue22277@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

I would like to propose a patch for the webbrowser module to actively suppress any output (both on stdout and stderr) from the module itself.

At the moment, doing a quick internet search, the best approximation to obtain this kind of behavior seems to be the ones described in [1] and [2].

In the patch attached I am proposing to add two optional arguments: stdout and stderr to webbroswer.open() (and to the related webbroswer.open_new() and webbroswer.open_new_tab())

Setting stdout and stderr to None effectively suppress any terminal output. The default (True), mimics the current behavior.

There are other minor modifications to clean the code (PEP8).

I will send a similar patch for Python 2.7.X

Cristian

[1] https://stackoverflow.com/questions/2323080/how-can-i-disable-the-webbrowser-message-in-python
[2] https://stackoverflow.com/questions/1352361/suppress-redirect-stderr-when-calling-python-webrowser
History
Date User Action Args
2014-08-26 13:06:36CristianCantorosetrecipients: + CristianCantoro
2014-08-26 13:06:36CristianCantorosetmessageid: <1409058396.11.0.385358825237.issue22277@psf.upfronthosting.co.za>
2014-08-26 13:06:36CristianCantorolinkissue22277 messages
2014-08-26 13:06:35CristianCantorocreate