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.

classification
Title: Add browsh in the webbrowser module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.10
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: python-dev, saiansh2525, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2020-11-12 03:57 by saiansh2525, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23289 closed python-dev, 2020-11-14 19:04
Messages (3)
msg380802 - (view) Author: Saiansh Singh (saiansh2525) Date: 2020-11-12 03:57
The webbrowser module is a module used to create a new tab or window inside browsers. It is currently built into python. It supports multiple terminal-based browsers but yet doesn't support browsh. Here is the documentation for browsh for more information: brow.sh. The repository is at: github.com/browsh-org/browsh. It runs firefox on headless and displays the websites inside the terminal.

Happy to make a PR! 😃
msg380966 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-11-14 09:35
We do not add just any old or new browser to webrowser's predefined list.  (And there are likely some that should be dropped.)  The last addition was the Chrome group in 3.3.  Neither Microsoft Explorer or Edge are listed.  I believe the former was considered to be covered sufficient well by 'windows-default'.

On Windows and Mac, one can use any browser by making it the default.  It is also possible for any browser to make itself easily usable from Python by adding a module that registers the browser controller class on import.  You should suggest this to the browsh dev and see if *they* care.

Looking further, there are about 10 browsers with measured usage listed in https://en.wikipedia.org/wiki/Web_browser that are not on the webbrowser list.  There are more at https://en.wikipedia.org/wiki/List_of_web_browsers, including  Browsh appears on neither list.  It does appear on https://en.wikipedia.org/wiki/Text-based_web_browser.  But it seems too obscure to deserve being added.  So I think this request should be rejected.
msg380986 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-11-14 20:00
I concur with Terry.

Actually, registering the browser is not necessary for using it. Set the environment variable BROWSER and use your favorite browser. The following example uses curl (which is not registered as in the webbrowser module) as a browser:

BROWSER=curl python3 -m webbrowser -n http://example.org

The registry in the webbrowser module is used for the case if you use Python on some non-mainstream platform which does not have OS-level infrastructure for running default browser or settings are empty. I.e. it is not Windows or macOS and does not support OpenDesktop and Posix specifications, and BROWSER is not set. If you have such marginal system and use marginal browser on it, it is worth to spend some time for setting BROWSER or configuring www-browser, x-www-browser, xdg-open, etc.
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86496
2020-11-14 23:49:30terry.reedysetstatus: open -> closed
resolution: rejected
stage: patch review -> resolved
2020-11-14 20:00:35serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg380986
2020-11-14 19:04:27python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request22180
stage: patch review
2020-11-14 09:35:36terry.reedysetnosy: + terry.reedy
messages: + msg380966
2020-11-12 03:57:13saiansh2525create