Issue 42330: Add browsh in the webbrowser module (original) (raw)

Issue42330

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:38 admin set github: 86496
2020-11-14 23:49:30 terry.reedy set status: open -> closedresolution: rejectedstage: patch review -> resolved
2020-11-14 20:00:35 serhiy.storchaka set nosy: + serhiy.storchakamessages: +
2020-11-14 19:04:27 python-dev set keywords: + patchnosy: + python-devpull_requests: + <pull%5Frequest22180>stage: patch review
2020-11-14 09:35:36 terry.reedy set nosy: + terry.reedymessages: +
2020-11-12 03:57:13 saiansh2525 create