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
Document the controller.name
field in webbrowser
module
#87590
Comments
The object https://docs.python.org/3/library/webbrowser.html#browser-controller-objects 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:
# https://chromium.googlesource.com/chromiumos/platform2/+/master/vm_tools/garcon/#opening-urls
# https://source.chromium.org/search?q=garcon-url-handler
if "garcon-url-handler" in webbrowser.get().name:
webbrowser.open("http://external-url.com/docs.html")
else:
webbrowser.open("file:///usr/share/doc/docs.html") This would work correctly, even if the user has installed a browser native to the Linux VM and put it into their Some references to where the |
Zach, gaurawgoshwami is a spammer. Deleted added nosy, unlinked spam file and unrelated PR. I have no idea what 'repository containing patch' means or how g. created link to non-existent? file. |
Hm, looks like
This happens because It has this API for 12 years now: 4d39f6e So, I see two possible ways to solve this:
|
Thank you very much, Nikita! Your patch would certainly solve my issue. As is, I checked the code I wrote, and it seems that only a lucky Ilya. On Wed, Dec 29, 2021 at 5:30 PM Dong-hee Na report@bugs.python.org wrote:
|
webbrowser.MacOSXOSAScript._name
attribute #30241Note: 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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: