Clickable hyperlinks

D'Arcy Cain darcy at
Wed Jan 4 08:03:09 EST 2017

Deborah - please trim your quoted text.

On 2017-01-04 04:32 AM, Deborah Swanson wrote:
> Thanks, Steven. Yes, of course if you want to print strings you must
> enclose them in quotes. I think you learn that in Week 1 of any
> introductory course on Python.

Closer to minute one.  When I investigated Python years ago the first 
thing I learned was;

  print "Hello, world"

> But we aren't trying to print strings here, the point is to produce
> clickable links. I didn't enclose them with quotes because I didn't see
> any point in printing plain text when I wanted clickable links. I

I'm not sure what your links are composed of but mine all look like 
sequences of characters or "strings."  It sounds like you are trying to 
make URL a first class type like strings. integers, floats, etc.  I 
can't think of any language that treats URLs as first class objects. 
Even HTML needs quotes:

   <A HREF="http://...">Go here</A>

> actually didn't understand why you thought I should print them, but it

You want to output them to something.  That often involves printing them 
to a particular handler.

> never would have occurred to me that you wanted me to print out a bunch
> of silly plain text strings, apparently just for the heck of it.

Is that really what you got from his message?

> At this point, if I pursue this any farther, it will be to look into how
> Firefox takes webpage titles and urls out of its sqlite database and
> makes objects you can click on to open the webpages. That's the basic
> technology I'd need to find a way to talk (write) python into doing.

I can assure you that FF prints the string at some point.  It may wrap 
it in HTML tags first but printing is what it does.  Also, the URLs are 
stored as strings.  SQLite has no URL type.  If it did then it would 
still store it as a string somewhere.  PostGreSQL would let you create a 
URL type if you wanted but you would still need to wrap it in quotes 
(single in this case) when you created the entry.

> If it's even worth it. On a practical level it's not worth it, way too
> much work for the teensy advantage of having it to use. It might be some
> giggles to figure out how to do it and maybe I will sometime just for
> funsies.

In all the messages in this thread I still don't understand what this 
"teensy advantage" is supposed to be.  Do you want to be able to do this:


instead of:


D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy at Vex.Net
VoIP: sip:darcy at Vex.Net

More information about the Python-list mailing list