| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…rder in webbrowser.py
…Dkv9O.rst Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
There was a problem hiding this comment.
Should we add a usage example somewhere? This feature is rather hard to comprehend.
Sorry, something went wrong.
The feature was hard to fully comprehend even before I made it more complex :-( Adding some examples would definitely help, and it would be even better to slightly restructure the description of this feature. I'll see if I can come up with a better description. BTW. Some other things I noticed (for different PRs):
|
Sorry, something went wrong.
Not limited to macOS, but from the Plausible trial in July, here are the most popular browsers of people visiting docs.python.org:
Also not limited to macOS, here are the most popular desktop browsers used worldwide, from statscounter: And visitors to usa.gov sites (json), for macOS: "Macintosh": {
"Safari": 260849550,
"Chrome": 201103500,
"Firefox": 16103981,
"Edge": 2024170,
"Mozilla Compatible Agent": 2018923,
"Opera": 552767,
"YaBrowser": 36155,
"Whale Browser": 15131,
"DuckDuckGo Browser": 5801,
"Coc Coc": 10339,
"SeaMonkey": 4535,
"Aloha Browser": 3174,
"Maxthon": 4181,
"Mozilla": 2253,
"Internet Explorer": 5163,
"Waterfox": 1837,
"PaleMoon": 139,
"(not set)": 215,
"Vivaldi": 748
}, |
Sorry, something went wrong.
|
Given how the mac launchers work, I think it would also be sensible for $BROWSER to accept application names, as the standard way to launch a URL with browser is e.g. open -a 'Google Chrome' URL (equivalent for tell application in current osascript implementation). e.g. if shutil.which(cmd[0]):
# on the command-line
GenericBrowser
else:
# maybe check if app exists?
OSAScript(app_name)I'm not sure what the right backward-compatibility story is, or if that's appropriate if $BROWSER is a standard env expected to point to a shell executable. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the PR, I added a What's New entry based on the blurb.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR makes it possible to use $BROWSER to reorder the list of registered (default) browsers, instead of always interpreting values as command-line tools.
The PR also fixes the registration for "chrome" on macOS, the app name is "google chrome" (and has been for years)
This is particularly useful on macOS where the default way to start a browser is not a command-line tool.
📚 Documentation preview 📚: https://cpython-previews--113561.org.readthedocs.build/