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! 😃
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.
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