Skip to content
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

✨ Update launch to not print anything when opening urls #1035

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

patrick91
Copy link
Contributor

@patrick91 patrick91 commented Oct 30, 2024

It's not launch that does this, but the actual browsers that print text when starting, see:

image

This PR updates launch to handle URLs and swallow the output being printed by browsers (when possibile)

It now looks like this:

image

@patrick91 patrick91 closed this Oct 30, 2024
@patrick91 patrick91 reopened this Oct 30, 2024
This replaces `webbrowser.open` in order to prevent
spammy messages being shown on the terminal.
@patrick91 patrick91 added the feature New feature, enhancement or request label Oct 31, 2024
@patrick91 patrick91 changed the title ✨ Add open_browser function ✨ Update launch to not print anything when opening urls Nov 1, 2024
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you @patrick91! 🚀 🍰

@tiangolo tiangolo merged commit ee072d8 into master Nov 7, 2024
23 checks passed
@tiangolo tiangolo deleted the feature/open-browser branch November 7, 2024 20:59
@paketb0te
Copy link

paketb0te commented Nov 11, 2024

@patrick91 just out of curiosity, which combination of python / OS / Browser did you find to be spammy?
You mention Chrome in the docstring of launch(), but at least on ubuntu I see no terminal output when using webbrowser.open() or webbrowser.get().open() (py3.8 to py3.13).
So I guess it is happening on macOS?
edit: nvm, your screenshots look very much like ubuntu 😆
Still wondering why I see no message though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, enhancement or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants