Skip to content

Add browsh in the webbrowser module #86496

Description

@saiansh2525
BPO 42330
Nosy @terryjreedy, @serhiy-storchaka
PRs
  • bpo-42330: Registered browsh in webbrowser module #23289
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-11-14.23:49:30.380>
    created_at = <Date 2020-11-12.03:57:13.988>
    labels = ['type-feature', 'library', '3.10']
    title = 'Add browsh in the webbrowser module'
    updated_at = <Date 2020-11-14.23:49:30.380>
    user = 'https://bugs.python.org/saiansh2525'

    bugs.python.org fields:

    activity = <Date 2020-11-14.23:49:30.380>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-11-14.23:49:30.380>
    closer = 'terry.reedy'
    components = ['Library (Lib)']
    creation = <Date 2020-11-12.03:57:13.988>
    creator = 'saiansh2525'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42330
    keywords = ['patch']
    message_count = 3.0
    messages = ['380802', '380966', '380986']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'python-dev', 'serhiy.storchaka', 'saiansh2525']
    pr_nums = ['23289']
    priority = 'normal'
    resolution = 'rejected'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue42330'
    versions = ['Python 3.10']

    Activity

    1. saiansh2525 commented on Nov 12, 2020

      saiansh2525mannequin
      MannequinAuthor

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

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Nov 12, 2020
    3. terryjreedy commented on Nov 14, 2020

      @terryjreedy
      Member

      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.

    4. serhiy-storchaka commented on Nov 14, 2020

      @serhiy-storchaka
      Member

      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.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions