This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ilyagr
Recipients docs@python, ilyagr
Date 2021-03-07.01:38:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The object `webbrowser.get()` returns has, and had for a long time, a useful but undocumented field `name`. I wonder if it would be OK to document it as something like `a system-dependent name for the browser`. This would go here:

The reason I'd like this is so that I can write code like the following:

# In Crostini Chrome OS Linux, the default browser is set to an
# intermediary called `garcon-url-handler`.
# It opens URLs in Chrome running outside the linux VM. This 
# browser does not have access to the Linux filesystem. Some references:

if "garcon-url-handler" in webbrowser.get().name:"")

This would work correctly, even if the user has installed a browser native to the Linux VM and put it into their `BROWSER` environment variable. I don't know a better way to achieve the same effect.

Some references to where the `name` field was introduced:
Date User Action Args
2021-03-07 01:38:28ilyagrsetrecipients: + ilyagr, docs@python
2021-03-07 01:38:28ilyagrsetmessageid: <>
2021-03-07 01:38:28ilyagrlinkissue43424 messages
2021-03-07 01:38:27ilyagrcreate