I need to display the text in the console and to click on this text in the browser page opens
for example, display: text
and to send us to the site by clicking
I need to display the text in the console and to click on this text in the browser page opens
for example, display: text
and to send us to the site by clicking
Just print the full link:
print("http://example.com") and if the terminal supports, then you will be able to open the link in a way specific to the terminal.
For example, in a GNOME terminal on Ubuntu, if you hover your mouse over a link, it is highlighted with an underline and Ctrl + click allows you to open it or use double + double-click on OS X in Terminal.app .
webbrowser module allows you to immediately open a link:
import webbrowser webbrowser.open("http://example.com") Source: https://ru.stackoverflow.com/questions/569811/
All Articles