Skip to content

Add browsh in the webbrowser module #86496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
saiansh2525 mannequin opened this issue Nov 12, 2020 · 3 comments
Closed

Add browsh in the webbrowser module #86496

saiansh2525 mannequin opened this issue Nov 12, 2020 · 3 comments
Labels
3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@saiansh2525
Copy link
Mannequin

saiansh2525 mannequin commented Nov 12, 2020

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']

    @saiansh2525
    Copy link
    Mannequin Author

    saiansh2525 mannequin commented Nov 12, 2020

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

    @saiansh2525 saiansh2525 mannequin added 3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Nov 12, 2020
    @terryjreedy
    Copy link
    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.

    @serhiy-storchaka
    Copy link
    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @terryjreedy terryjreedy closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants