[New-bugs-announce] [issue44844] The command line of launching Edge on Linux hangs

Ray Luo report at bugs.python.org
Thu Aug 5 14:58:31 EDT 2021


New submission from Ray Luo <rayluo at microsoft.com>:

Launching Chrome on Linux from command line:

    $ export BROWSER=google-chrome; python -m webbrowser https://httpbin.org/delay/10

    It can successfully launch Chrome with the specified web page opened in a new tab.
    And the console command line finishes BEFORE the web page being fully loaded in the browser. That is the desirable behavior.

Launching Edge on Linux from command line:

    $ export BROWSER=microsoft-edge; python -m webbrowser https://httpbin.org/delay/10

    The command line hangs until the Edge window is closed.

That hanging symptom can be resolved by writing a deliberate script to webbrowser.register("...", None, webbrowser.BackgroundBrowser("microsoft-edge")) and then use that registered browser. But it was not obvious, and it took trial-and-error to reach that solution.

Could it be possible to have the "BROWSER=microsoft-edge; python -m webbrowser https://httpbin.org/delay/10" work out of the box, without hanging?

Is it because Edge is not currently predefined and handled inside webbrowser.py? It seems not an easy decision to add new browser into webbrowser.py, though, based on the 2nd and 3rd comments in this old issue: https://bugs.python.org/issue42330

----------
components: Library (Lib)
messages: 399030
nosy: rayluo
priority: normal
severity: normal
status: open
title: The command line of launching Edge on Linux hangs
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44844>
_______________________________________


More information about the New-bugs-announce mailing list