2 ms·
And it's even using the user preferred browser! Tried it on my MacBook M1 and it opens Brave which is my main browser. Wonder if it's using the same mechanism
by codetrotter 5y ago
And it's even using the user preferred browser!
Tried it on my MacBook M1 and it opens Brave which is my main browser.
Wonder if it's using the same mechanism as the macOS open(1) command does for opening URLs. Or maybe even calling the /usr/bin/open binary.
- zirak 5y agoFrom the python source code: https://github.com/python/cpython/blob/11749e2dc20ad6a76e9a39e948853e89b2b4bbed/Lib/webbrowser.py#L619 https://github.com/python/cpython/blob/11749e2dc20ad6a76e9a3... It seems to be shelling out to osascript, either telling it to OpenURL or open.