0

Hyperlink in Python

How can a string be converted in Hyperlink, i.e., if I hover mouse over it, so it displays a link and on clicking that, it goes to that link............. s = "My Page" on hovering s it displays a link https:www.mypage.com/mypage and on clicking, it opens this page

27th Jun 2020, 4:05 PM
Suraj Soni
Suraj Soni - avatar
5 Respuestas
+ 1
Gaurav More solution is required for hyperlinking in python not in html.....
29th Jun 2020, 4:45 PM
Suraj Soni
Suraj Soni - avatar
+ 1
from hyperlink import URL url = URL.from_text(u'url_here') utm_source = url.get(u'utm_source') better_url = url.replace(scheme=u'https', port=443) org_url = better_url.click(u'.')
29th Jun 2020, 4:48 PM
Gaurav More
Gaurav More - avatar
0
<a href="url">link text</a> At the url place insert your page location with its name eg. Main.html replacing url.
29th Jun 2020, 4:38 PM
Gaurav More
Gaurav More - avatar
0
You have to import hyperlink package in the code
29th Jun 2020, 4:49 PM
Gaurav More
Gaurav More - avatar
0
Gaurav More your oppinion is correct but that doesn't work for what I have asked for The link generated in variable better_url will not be attached to the string "My Page" it is written seperately to use but I want to attach the url with the string and not to write it seperately
29th Jun 2020, 5:03 PM
Suraj Soni
Suraj Soni - avatar