Re: Clickable hyperlinks

2017-01-09 Thread Tim Chase
On 2017-01-09 14:33, Deborah Swanson wrote: > Ok, here is the crux of this thread's communication problem. I > didn't ask, or particularly care for all these lectures on the > technology of terminal emulators. I asked how to code Python to > make clickable links. The crux of the problem is that wo

Re: Clickable hyperlinks

2017-01-09 Thread Joel Goldstick
On Mon, Jan 9, 2017 at 8:33 PM, Michael Torrie wrote: > On 01/09/2017 06:02 PM, Deborah Swanson wrote: >> Fair enough. I only suggested that they could have started their own >> thread, but mainly just to point out that they would have been off-topic >> if they did. I didn't demand that they do so

Re: Clickable hyperlinks

2017-01-09 Thread Michael Torrie
On 01/09/2017 06:02 PM, Deborah Swanson wrote: > Fair enough. I only suggested that they could have started their own > thread, but mainly just to point out that they would have been off-topic > if they did. I didn't demand that they do so, I just wanted them to > think about it. I don't see how i

RE: Clickable hyperlinks

2017-01-09 Thread Deborah Swanson
Larry Martell wrote, on January 09, 2017 4:11 PM > > On Mon, Jan 9, 2017 at 5:33 PM, Deborah Swanson > wrote: > > Ok, here is the crux of this thread's communication problem. I didn't > > ask, or particularly care for all these lectures on the technology of > > terminal emulators. I asked how

Re: Clickable hyperlinks

2017-01-09 Thread Larry Martell
On Mon, Jan 9, 2017 at 5:33 PM, Deborah Swanson wrote: > Ok, here is the crux of this thread's communication problem. I didn't > ask, or particularly care for all these lectures on the technology of > terminal emulators. I asked how to code Python to make clickable links. > > Since all of you are

RE: Clickable hyperlinks

2017-01-09 Thread Deborah Swanson
Tim Chase wrote, on January 09, 2017 5:53 AM > > On 2017-01-09 05:00, Deborah Swanson wrote: > > Code does in fact have the power to control what happens > > in the console. How do you think Linux does it on their terminals with > > clickable links? Granted, the code may have to specify parameter

Re: Clickable hyperlinks

2017-01-09 Thread Michael Torrie
On 01/09/2017 10:27 AM, Michael Torrie wrote: >> You can use tkinter (code >> in a program) to make clickable links in the console, > > Unless you're talking about an implementation of a console or terminal > emulator in tkinter, this is incorrect. Tkinter does not do anything > with standard ou

Re: Clickable hyperlinks

2017-01-09 Thread Michael Torrie
On 01/09/2017 06:00 AM, Deborah Swanson wrote: > Rhodri James wrote, on January 09, 2017 4:28 AM >> >> Nope. PyCharm outputs text to the console that the console >> chooses to >> interpret as a link and makes clickable. As Stephen pointed >> out right >> back at the beginning of this thread,

Re: Clickable hyperlinks

2017-01-09 Thread Rhodri James
On 09/01/17 13:53, Tim Chase wrote: On 2017-01-09 05:00, Deborah Swanson wrote: The console is a dead thing, it has no mind or soul to choose anything. Surely an educated person would know that. Pretty much every quality system administrator I know uses the terminal. Just about all of the bes

Re: Clickable hyperlinks

2017-01-09 Thread Tim Chase
On 2017-01-09 05:00, Deborah Swanson wrote: > Code does in fact have the power to control what happens > in the console. How do you think Linux does it on their terminals > with clickable links? Granted, the code may have to specify > parameters for a particular console, but I certainly wasn't aski

RE: Clickable hyperlinks

2017-01-09 Thread Deborah Swanson
Rhodri James wrote, on January 09, 2017 4:28 AM > > Nope. PyCharm outputs text to the console that the console > chooses to > interpret as a link and makes clickable. As Stephen pointed > out right > back at the beginning of this thread, printing the textual > string that > is a URL could

Re: Clickable hyperlinks

2017-01-09 Thread Rhodri James
On 05/01/17 02:53, Deborah Swanson (Deborah Swanson) wrote: Rhodri James wrote, on January 05, 2017 3:53 AM On 05/01/17 04:52, Deborah Swanson wrote: My original question was in fact whether there was a way to make clickable hyperlinks in a console. I was persuaded after about 10 replies that

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Rhodri James wrote, on January 05, 2017 3:53 AM > > On 05/01/17 04:52, Deborah Swanson wrote: > > My original question was in fact whether there was a way to make > > clickable hyperlinks in a console. I was persuaded after about 10 > > replies that the answer was no, > > Then you were persuaded wr

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Terry Reedy wrote, on January 04, 2017 10:18 PM > > On 1/5/2017 12:11 AM, Deborah Swanson wrote: > > Terry Reedy wrote, on January 04, 2017 3:58 PM > > >> To have a string interpreted as a clickable link, you send the string to > >> software capable of creating a clickable link, plus the informatio

Re: Clickable hyperlinks

2017-01-06 Thread Chris Angelico
On Thu, Jan 5, 2017 at 3:19 PM, Deborah Swanson wrote: > I downloaded the code from the Package Index, but there really wasn't > much in it. This is the entire .py file: Ehh, wrong file. Try the one in the standard library: https://github.com/python/cpython/blob/master/Lib/antigravity.py https:/

Re: Clickable hyperlinks

2017-01-06 Thread Chris Angelico
On Thu, Jan 5, 2017 at 2:24 PM, D'Arcy Cain wrote: > Think of it this way. You drop a ring down a drain. You can ask two > questions, "How do I remove a drain trap?" or "How do I recover a ring that > I dropped down the drain?" If you ask the first question you will get lots > of advice on tool

Re: Clickable hyperlinks

2017-01-06 Thread D'Arcy Cain
On 2017-01-04 07:07 PM, Deborah Swanson wrote: > D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM >> 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: >> >>make_web_link(http://...) >> >

Re: Clickable hyperlinks

2017-01-06 Thread D'Arcy Cain
On 2017-01-04 05:58 PM, Deborah Swanson wrote: >> the user to go and authenticate, you can simply >> webbrowser.open("http://.../";) and it'll DTRT. > > Thank you, thank you! Finally, at least one person on this list knows > about something (anything) in the python world that is internet aware.

Re: Clickable hyperlinks

2017-01-06 Thread Dennis Lee Bieber
On Wed, 4 Jan 2017 14:58:42 -0800, "Deborah Swanson" declaimed the following: >Thank you, thank you! Finally, at least one person on this list knows >about something (anything) in the python world that is internet aware. >It's also occurred to me that Beautifulsoup downloads data from a url, >so

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/04/2017 03:58 PM, Deborah Swanson wrote: > Thank you, thank you! Finally, at least one person on this list knows > about something (anything) in the python world that is internet aware. > It's also occurred to me that Beautifulsoup downloads data from a url, > so that code must have access to

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 4:16 AM > > Yeah, there's no simple answer; however, you'll find that > Python on many platforms is entirely capable of popping a URL > up in the user's default browser. Check this out: > > >>> import antigravity I downloaded the code from the Package Inde

Re: Clickable hyperlinks

2017-01-06 Thread Rustom Mody
This thread does lead to the question: Is the Url type in python less first-class than it could be? In scheme I could point to something like this https://docs.racket-lang.org/net/url.html Is there something equivalent in python? -- https://mail.python.org/mailman/listinfo/python-list

Re: Clickable hyperlinks

2017-01-06 Thread Chris Angelico
On Thu, Jan 5, 2017 at 9:58 AM, Deborah Swanson wrote: > Chris Angelico wrote, on January 04, 2017 4:16 AM >> This uses the 'webbrowser' module, which knows about a number >> of different ways to open a browser, and will attempt them >> all. So if you can figure out the UI part of things, actually

Re: Clickable hyperlinks

2017-01-06 Thread Terry Reedy
On 1/4/2017 4:32 AM, Deborah Swanson wrote: > My original question was whether python had anything to provide this > functionality, and the answer appears to be a resounding NO!!! I would say 'Yes, but with user effort'. To have a string interpreted as a clickable link, you send the string to s

Re: Clickable hyperlinks

2017-01-06 Thread Grant Edwards
On 2017-01-04, Michael Torrie wrote: > On my Linux machine, the terminal emulators I've used all make a regular > url printed out into a clickable link (or at least a right-clickable > link). This is just something they try to do with all things that look > like urls. Sometimes it's helpful, of

Re: Clickable hyperlinks

2017-01-06 Thread Grant Edwards
On 2017-01-03, Deborah Swanson wrote: > Grant Edwards wrote, on January 03, 2017 3:13 PM >> >> On 2017-01-03, Deborah Swanson wrote: >> >> > I'm sorry, I should have said a GUI console because I >> wouldn't expect >> > a text-based console to produce clickable links. >> >> What's a "GUI console"?

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 4:16 AM > > On Wed, Jan 4, 2017 at 10:43 PM, Deborah Swanson > wrote: > > I'm quite well aware by now that there is no one-sentence > answer to my > > original question, if there's any coherent answer at all. > Them's the > > breaks. Live with it or live w

Re: Clickable hyperlinks

2017-01-06 Thread D'Arcy Cain
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 investigat

Re: Clickable hyperlinks

2017-01-06 Thread Chris Angelico
On Wed, Jan 4, 2017 at 10:43 PM, Deborah Swanson wrote: > I'm quite well aware by now that there is no one-sentence answer to my > original question, if there's any coherent answer at all. Them's the > breaks. Live with it or live without it, it doesn't care. Yeah, there's no simple answer; howev

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM > > Deborah - please trim your quoted text. Yes, I will. Some lists want to have it all to review in one message, some want it trimmed to just the lines you are responding to. I was just waiting to see what this list wants. > On 2017-01-

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Steve D'Aprano wrote, on January 04, 2017 2:39 AM > > On Wed, 4 Jan 2017 08:32 pm, 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. > > > > But w

Re: Clickable hyperlinks

2017-01-06 Thread Gilmeh Serda
On Tue, 03 Jan 2017 11:46:16 -0800, Deborah Swanson wrote: > Does python have an equivalent function? Probably the most common use > for it would be output to the console, similar to a print statement, but > clickable. Write it as HTML code save to temp file and call the browser which loads the

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Steve D'Aprano wrote, on January 04, 2017 2:20 AM > > On Wed, 4 Jan 2017 03:46 pm, Deborah Swanson wrote: > > > As I've mentioned in other posts on this thread, I'm now > thinking that > > I need to write a class to do this, and find out how > Firefox and url > > aware terminals in Linux do it. The

RE: Clickable hyperlinks

2017-01-06 Thread Steve D'Aprano
On Wed, 4 Jan 2017 03:46 pm, Deborah Swanson wrote: > As I've mentioned in other posts on this thread, I'm now thinking that I > need to write a class to do this, and find out how Firefox and url aware > terminals in Linux do it. There must be a way. A GUI application can interpret text any way

RE: Clickable hyperlinks

2017-01-06 Thread Steve D'Aprano
d be able to change the subject without breaking the thread: Clickable hyperlinks âö£âö RE: Clickable hyperlinks âöé âö£âö Re: RE: Clickable hyperlinks âöé âööâö RE: Clickable hyperlinks âöé âööâö Threading [was Re: Clickable hyperlinks] âöéâööâö Re: Threading âö£âö RE: C

RE: Clickable hyperlinks

2017-01-06 Thread Steve D'Aprano
On Wed, 4 Jan 2017 08:32 pm, 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. > > But we aren't trying to print strings here, the point is to produce > cl

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Steven D'Aprano wrote, on January 03, 2017 9:40 PM > > On Wednesday 04 January 2017 15:46, Deborah Swanson wrote: > > > Steven D'Aprano wrote, on January 03, 2017 8:04 PM > [...] > >> Of course you have to put quotes around them to enter them in your > >> source code. We don't expect this to work:

Re: Clickable hyperlinks

2017-01-06 Thread D'Arcy Cain
On 2017-01-04 08:44 AM, Rodrigo Bistolfi wrote: > 2017-01-04 7:39 GMT-03:00 Steve D'Aprano : >> Aside: you've actually raised a fascinating question. I wonder whether >> there >> are any programming languages that understand URLs as native data types, so >> that *source code* starting with http://

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Steven D'Aprano wrote, on January 03, 2017 8:04 PM > > On Wednesday 04 January 2017 14:04, Deborah Swanson wrote: > > > Steve D'Aprano wrote, on January 03, 2017 4:56 PM > [...] > >> Python can't force the console to treat something as a clickable > >> link, if the console has no capacity for click

Re: Clickable hyperlinks

2017-01-06 Thread Rodrigo Bistolfi
2017-01-04 7:39 GMT-03:00 Steve D'Aprano : > On Wed, 4 Jan 2017 08:32 pm, Deborah Swanson wrote: > > Aside: you've actually raised a fascinating question. I wonder whether > there > are any programming languages that understand URLs as native data types, so > that *source code* starting with http:

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
etimes the topic just naturally evolves to the point that a change in subject is sensible. Take this thread for example: the topic has drifted from "Clickable hyperlinks" to talking about email threading. I should be able to change the subject without breaking the thread: Clickabl

RE: Clickable hyperlinks

2017-01-06 Thread Steven D'Aprano
On Wednesday 04 January 2017 14:04, Deborah Swanson wrote: > Steve D'Aprano wrote, on January 03, 2017 4:56 PM [...] >> Python can't force the console to treat something as a >> clickable link, if the console has no capacity for clickable >> links. Nor can Python predict what format the console us

Re: Clickable hyperlinks

2017-01-06 Thread Paul Rudin
"Deborah Swanson" writes: > > I didn't try printing them before, but I just did. Got: > print([Example](http://www.example.com) > > SyntaxError: invalid syntax (arrow pointing at the colon) > With respect, if you typed that at python then it's probably a good idea to take a step back and

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/03/2017 08:28 PM, Deborah Swanson wrote: > I think you're making this too complicated. I meant a console in a GUI > application. Ahh. Well, a "console in a GUI application" is whatever you make it[1]. There's no single "GUI console" hence my confusion and the confusion expressed by the oth

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Michael Torrie wrote, on January 03, 2017 8:05 PM > > On 01/03/2017 08:46 PM, Deborah Swanson wrote: > > Actually it is, or at least it doesn't happen in all email readers. > > Mine, for instance, never breaks up threads. > > Mine doesn't either, which illustrates the issue. This > message, for exa

Re: Clickable hyperlinks

2017-01-06 Thread Dennis Lee Bieber
On Tue, 3 Jan 2017 20:46:31 -0800, "Deborah Swanson" declaimed the following: > >I didn't try printing them before, but I just did. Got: > print([Example](http://www.example.com) > >SyntaxError: invalid syntax (arrow pointing at the colon) > As I mentioned to someone else earlier..

Re: Clickable hyperlinks

2017-01-06 Thread boB Stepp
On Tue, Jan 3, 2017 at 10:46 PM, Deborah Swanson wrote: > > > I didn't try printing them before, but I just did. Got: > > >>> print([Example](http://www.example.com) > > SyntaxError: invalid syntax (arrow pointing at the colon) As Steve had said, you need to put everything inside quotes. Also,

RE: Clickable hyperlinks

2017-01-06 Thread Steven D'Aprano
On Wednesday 04 January 2017 15:46, Deborah Swanson wrote: > Steven D'Aprano wrote, on January 03, 2017 8:04 PM [...] >> Of course you have to put quotes around them to enter them in >> your source code. >> We don't expect this to work: >> >> print(Hello World!) >> >> >> you have to use a stri

Re: Clickable hyperlinks

2017-01-06 Thread Dan Sommers
On Wed, 04 Jan 2017 16:40:00 +1100, Steven D'Aprano wrote: > On Wednesday 04 January 2017 15:46, Deborah Swanson wrote: > >> Steven D'Aprano wrote, on January 03, 2017 8:04 PM > [...] >>> Of course you have to put quotes around them to enter them in >>> your source code. >>> We don't expect this t

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
Steve D'Aprano wrote, on January 03, 2017 4:56 PM > On Wed, 4 Jan 2017 10:32 am, Deborah Swanson wrote: > > > > The GUI consoles I have are in Pycharm, the IDLE that comes with > > Anaconda, and Spyder. PyCharm and IDLE both ask for internet access > > when I open them, so they're capable of openi

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/03/2017 08:46 PM, Deborah Swanson wrote: > Actually it is, or at least it doesn't happen in all email readers. > Mine, for instance, never breaks up threads. Mine doesn't either, which illustrates the issue. This message, for example appears under a long thread that started out life as "me

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
David wrote, on January 03, 2017 6:36 PM > > On 4 January 2017 at 11:50, Deborah Swanson > wrote: > > Erik wrote, on January 03, 2017 3:30 PM > >> > >> When you start a new topic on the list, could you please > write a new > >> message rather than replying to an existing message and > changing the

Re: Clickable hyperlinks

2017-01-06 Thread David
On 4 January 2017 at 11:50, Deborah Swanson wrote: > Erik wrote, on January 03, 2017 3:30 PM >> >> When you start a new topic on the list, could you please write a new >> message rather than replying to an existing message and changing the >> title/subject? >> > Certainly. I've been on many other

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/03/2017 04:32 PM, Deborah Swanson wrote: > The GUI consoles I have are in Pycharm, the IDLE that comes with > Anaconda, and Spyder. PyCharm and IDLE both ask for internet access when > I open them, so they're capable of opening links, but whether that means > their output space is capable of

RE: Clickable hyperlinks

2017-01-05 Thread Deborah Swanson
Erik wrote, on January 03, 2017 3:30 PM > To: python-list@python.org > Subject: Re: Clickable hyperlinks > > Hi. > > On 03/01/17 19:46, Deborah Swanson wrote: > > Excel has a formula: > > When you start a new topic on the list, could you please write a new > m

RE: Clickable hyperlinks

2017-01-05 Thread Steve D'Aprano
On Wed, 4 Jan 2017 10:32 am, Deborah Swanson wrote: > The GUI consoles I have are in Pycharm, the IDLE that comes with > Anaconda, and Spyder. PyCharm and IDLE both ask for internet access when > I open them, so they're capable of opening links, but whether that means > their output space is capa

Re: Clickable hyperlinks

2017-01-05 Thread Tim Chase
On 2017-01-03 11:46, Deborah Swanson wrote: > Excel has a formula: > > =HYPERLINK(url,description) > > that will put a clickable link into a cell. > > Does python have an equivalent function? Probably the most common > use for it would be output to the console, similar to a print > statement, but c

RE: Clickable hyperlinks

2017-01-05 Thread Deborah Swanson
Grant Edwards wrote, on January 03, 2017 3:13 PM > > On 2017-01-03, Deborah Swanson wrote: > > > I'm sorry, I should have said a GUI console because I > wouldn't expect > > a text-based console to produce clickable links. > > What's a "GUI console"? > > -- > Grant Edwards grant.b.edw

Re: Clickable hyperlinks

2017-01-05 Thread Erik
Hi. On 03/01/17 19:46, Deborah Swanson wrote: > Excel has a formula: When you start a new topic on the list, could you please write a new message rather than replying to an existing message and changing the title/subject? For those reading the list in a threaded email client, this message is sh

Re: Clickable hyperlinks

2017-01-05 Thread Grant Edwards
On 2017-01-03, Deborah Swanson wrote: > I'm sorry, I should have said a GUI console because I wouldn't expect a > text-based console to produce clickable links. What's a "GUI console"? -- Grant Edwards grant.b.edwardsYow! I want you to MEMORIZE

RE: Re: Clickable hyperlinks

2017-01-05 Thread Deborah Swanson
Devin Jeanpierre wrote, on January 03, 2017 12:57 PM >Sadly, no. :( Consoles (and stdout) are just text, not hypertext. The way to >make an URL clickable is to use a terminal that makes URLs clickable, and >print the URL: > > >print("%s: %s" % (description, url)) > > > > >-- Devin I'm sorry, I s

RE: Re: Clickable hyperlinks

2017-01-05 Thread Dan Strohl via Python-list
- From: Python-list [mailto:python-list-bounces+d.strohl=f5@python.org] On Behalf Of Deborah Swanson Sent: Tuesday, January 03, 2017 1:35 PM To: 'Devin Jeanpierre' Cc: 'comp.lang.python' Subject: RE: Re: Clickable hyperlinks Devin Jeanpierre wrote, on January 03, 2017 12:5

RE: Clickable hyperlinks

2017-01-05 Thread Dan Strohl via Python-list
tever... I think I actually just sub-classed url.parse or something) -Original Message- From: Python-list [mailto:python-list-bounces+d.strohl=f5@python.org] On Behalf Of Devin Jeanpierre Sent: Tuesday, January 03, 2017 12:57 PM To: pyt...@deborahswanson.net Cc: comp.lang.python Sub

Re: Clickable hyperlinks

2017-01-05 Thread Devin Jeanpierre
Sadly, no. :( Consoles (and stdout) are just text, not hypertext. The way to make an URL clickable is to use a terminal that makes URLs clickable, and print the URL: print("%s: %s" % (description, url)) -- Devin On Tue, Jan 3, 2017 at 11:46 AM, Deborah Swanson wrote: > Excel has a formula:

RE: Clickable hyperlinks

2017-01-05 Thread Deborah Swanson
Rhodri James wrote, on January 05, 2017 3:53 AM > > On 05/01/17 04:52, Deborah Swanson wrote: > > My original question was in fact whether there was a way to make > > clickable hyperlinks in a console. I was persuaded after about 10 > > replies that the answer was no, > > Then you were persuade

RE: Clickable hyperlinks

2017-01-05 Thread Deborah Swanson
Terry Reedy wrote, on January 04, 2017 10:18 PM > > On 1/5/2017 12:11 AM, Deborah Swanson wrote: > > Terry Reedy wrote, on January 04, 2017 3:58 PM > > >> To have a string interpreted as a clickable link, you send the string to > >> software capable of creating a clickable link, plus the informat

Re: Clickable hyperlinks

2017-01-05 Thread Rhodri James
On 05/01/17 04:52, Deborah Swanson wrote: My original question was in fact whether there was a way to make clickable hyperlinks in a console. I was persuaded after about 10 replies that the answer was no, Then you were persuaded wrong; the actual answer was "this isn't a meaningful question si

Re: Clickable hyperlinks

2017-01-04 Thread Terry Reedy
On 1/5/2017 12:11 AM, Deborah Swanson wrote: Terry Reedy wrote, on January 04, 2017 3:58 PM To have a string interpreted as a clickable link, you send the string to software capable of creating a clickable link, plus the information 'this is a clickable link'*. There are two ways to tag a s

Re: Clickable hyperlinks

2017-01-04 Thread Steven D'Aprano
On Thursday 05 January 2017 14:22, Rustom Mody wrote: > This thread does lead to the question: > Is the Url type in python less first-class than it could be? > > In scheme I could point to something like this > https://docs.racket-lang.org/net/url.html Those docs say: "To access the text of a d

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Terry Reedy wrote, on January 04, 2017 3:58 PM > > On 1/4/2017 4:32 AM, Deborah Swanson wrote: > > > My original question was whether python had anything to provide this > > functionality, and the answer appears to be a resounding NO!!! > > I would say 'Yes, but with user effort'. > > To have

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 8:27 PM > > On Thu, Jan 5, 2017 at 3:19 PM, Deborah Swanson > wrote: > > I downloaded the code from the Package Index, but there really wasn't > > much in it. This is the entire .py file: > > Ehh, wrong file. Try the one in the standard library: > htt

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 3:49 PM > > On Thu, Jan 5, 2017 at 9:58 AM, Deborah Swanson > wrote: > > > > Thank you, thank you! Finally, at least one person on this list knows > > about something (anything) in the python world that is internet aware. > > We've been all talking a

Re: Clickable hyperlinks

2017-01-04 Thread Michael Torrie
On 01/04/2017 09:19 PM, Deborah Swanson wrote: > Or, take a look at import's code and figure out how it opens a url in a > browser. I imagine it's the 'webbrowser' module you mention. If it tries > several methods, just pick one that will work for you. webbrowser is part of the python standard lib

Re: Clickable hyperlinks

2017-01-04 Thread Chris Angelico
On Thu, Jan 5, 2017 at 3:19 PM, Deborah Swanson wrote: > I downloaded the code from the Package Index, but there really wasn't > much in it. This is the entire .py file: Ehh, wrong file. Try the one in the standard library: https://github.com/python/cpython/blob/master/Lib/antigravity.py https:/

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 4:16 AM > > Yeah, there's no simple answer; however, you'll find that > Python on many platforms is entirely capable of popping a URL > up in the user's default browser. Check this out: > > >>> import antigravity I downloaded the code from the Package

Re: Clickable hyperlinks

2017-01-04 Thread Chris Angelico
On Thu, Jan 5, 2017 at 2:24 PM, D'Arcy Cain wrote: > Think of it this way. You drop a ring down a drain. You can ask two > questions, "How do I remove a drain trap?" or "How do I recover a ring that > I dropped down the drain?" If you ask the first question you will get lots > of advice on tool

Re: Clickable hyperlinks

2017-01-04 Thread Rustom Mody
This thread does lead to the question: Is the Url type in python less first-class than it could be? In scheme I could point to something like this https://docs.racket-lang.org/net/url.html Is there something equivalent in python? -- https://mail.python.org/mailman/listinfo/python-list

Re: Clickable hyperlinks

2017-01-04 Thread D'Arcy Cain
On 2017-01-04 07:07 PM, Deborah Swanson wrote: D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM 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: make_web_link(http://...) instead of:

Re: Clickable hyperlinks

2017-01-04 Thread D'Arcy Cain
On 2017-01-04 05:58 PM, Deborah Swanson wrote: the user to go and authenticate, you can simply webbrowser.open("http://.../";) and it'll DTRT. Thank you, thank you! Finally, at least one person on this list knows about something (anything) in the python world that is internet aware. Lots

Re: Clickable hyperlinks

2017-01-04 Thread Michael Torrie
On 01/04/2017 03:58 PM, Deborah Swanson wrote: > Thank you, thank you! Finally, at least one person on this list knows > about something (anything) in the python world that is internet aware. > It's also occurred to me that Beautifulsoup downloads data from a url, > so that code must have access to

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM > > Deborah - please trim your quoted text. Yes, I will. Some lists want to have it all to review in one message, some want it trimmed to just the lines you are responding to. I was just waiting to see what this list wants. > On 2017-01-

Re: Clickable hyperlinks

2017-01-04 Thread Terry Reedy
On 1/4/2017 4:32 AM, Deborah Swanson wrote: My original question was whether python had anything to provide this functionality, and the answer appears to be a resounding NO!!! I would say 'Yes, but with user effort'. To have a string interpreted as a clickable link, you send the string to so

Re: Clickable hyperlinks

2017-01-04 Thread Chris Angelico
On Thu, Jan 5, 2017 at 9:58 AM, Deborah Swanson wrote: > Chris Angelico wrote, on January 04, 2017 4:16 AM >> This uses the 'webbrowser' module, which knows about a number >> of different ways to open a browser, and will attempt them >> all. So if you can figure out the UI part of things, actually

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Chris Angelico wrote, on January 04, 2017 4:16 AM > > On Wed, Jan 4, 2017 at 10:43 PM, Deborah Swanson > wrote: > > I'm quite well aware by now that there is no one-sentence > answer to my > > original question, if there's any coherent answer at all. > Them's the > > breaks. Live with it or

Re: Clickable hyperlinks

2017-01-04 Thread Grant Edwards
On 2017-01-04, Michael Torrie wrote: > On my Linux machine, the terminal emulators I've used all make a regular > url printed out into a clickable link (or at least a right-clickable > link). This is just something they try to do with all things that look > like urls. Sometimes it's helpful, of

Re: Clickable hyperlinks

2017-01-04 Thread Grant Edwards
On 2017-01-03, Deborah Swanson wrote: > Grant Edwards wrote, on January 03, 2017 3:13 PM >> >> On 2017-01-03, Deborah Swanson wrote: >> >> > I'm sorry, I should have said a GUI console because I >> wouldn't expect >> > a text-based console to produce clickable links. >> >> What's a "GUI cons

Re: Clickable hyperlinks

2017-01-04 Thread D'Arcy Cain
On 2017-01-04 08:44 AM, Rodrigo Bistolfi wrote: 2017-01-04 7:39 GMT-03:00 Steve D'Aprano : Aside: you've actually raised a fascinating question. I wonder whether there are any programming languages that understand URLs as native data types, so that *source code* starting with http:// etc is unde

Re: Clickable hyperlinks

2017-01-04 Thread Rodrigo Bistolfi
2017-01-04 7:39 GMT-03:00 Steve D'Aprano : > On Wed, 4 Jan 2017 08:32 pm, Deborah Swanson wrote: > > Aside: you've actually raised a fascinating question. I wonder whether > there > are any programming languages that understand URLs as native data types, so > that *source code* starting with http:

Re: Clickable hyperlinks

2017-01-04 Thread D'Arcy Cain
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

Re: Clickable hyperlinks

2017-01-04 Thread Chris Angelico
On Wed, Jan 4, 2017 at 10:43 PM, Deborah Swanson wrote: > I'm quite well aware by now that there is no one-sentence answer to my > original question, if there's any coherent answer at all. Them's the > breaks. Live with it or live without it, it doesn't care. Yeah, there's no simple answer; howev

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Steve D'Aprano wrote, on January 04, 2017 2:39 AM > > On Wed, 4 Jan 2017 08:32 pm, 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. > > > >

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Steve D'Aprano wrote, on January 04, 2017 2:20 AM > > On Wed, 4 Jan 2017 03:46 pm, Deborah Swanson wrote: > > > As I've mentioned in other posts on this thread, I'm now > thinking that > > I need to write a class to do this, and find out how > Firefox and url > > aware terminals in Linux do i

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
hange the subject, but that sometimes the topic just naturally evolves to the point that a change in subject is sensible. Take this thread for example: the topic has drifted from "Clickable hyperlinks" to talking about email threading. I should be able to change the subject without br

RE: Clickable hyperlinks

2017-01-04 Thread Steve D'Aprano
On Wed, 4 Jan 2017 08:32 pm, 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. > > But we aren't trying to print strings here, the point is to produce > c

RE: Clickable hyperlinks

2017-01-04 Thread Steve D'Aprano
On Wed, 4 Jan 2017 03:46 pm, Deborah Swanson wrote: > As I've mentioned in other posts on this thread, I'm now thinking that I > need to write a class to do this, and find out how Firefox and url aware > terminals in Linux do it. There must be a way. A GUI application can interpret text any way

RE: Clickable hyperlinks

2017-01-04 Thread Steve D'Aprano
able to change the subject without breaking the thread: Clickable hyperlinks ├─ RE: Clickable hyperlinks │ ├─ Re: RE: Clickable hyperlinks │ └─ RE: Clickable hyperlinks │ └─ Threading [was Re: Clickable hyperlinks] │└─ Re: Threading ├─ RE: Clickable hyperlinks └─ Re: Clickable hyperlinks

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Steven D'Aprano wrote, on January 03, 2017 9:40 PM > > On Wednesday 04 January 2017 15:46, Deborah Swanson wrote: > > > Steven D'Aprano wrote, on January 03, 2017 8:04 PM > [...] > >> Of course you have to put quotes around them to enter them in your > >> source code. We don't expect this to wor

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
Michael Torrie wrote, on January 03, 2017 8:05 PM > > On 01/03/2017 08:46 PM, Deborah Swanson wrote: > > Actually it is, or at least it doesn't happen in all email readers. > > Mine, for instance, never breaks up threads. > > Mine doesn't either, which illustrates the issue. This > message, fo

Re: Clickable hyperlinks

2017-01-04 Thread Paul Rudin
"Deborah Swanson" writes: > > I didn't try printing them before, but I just did. Got: > print([Example](http://www.example.com) > > SyntaxError: invalid syntax (arrow pointing at the colon) > With respect, if you typed that at python then it's probably a good idea to take a step b

Re: Clickable hyperlinks

2017-01-03 Thread Dan Sommers
On Wed, 04 Jan 2017 16:40:00 +1100, Steven D'Aprano wrote: > On Wednesday 04 January 2017 15:46, Deborah Swanson wrote: > >> Steven D'Aprano wrote, on January 03, 2017 8:04 PM > [...] >>> Of course you have to put quotes around them to enter them in >>> your source code. >>> We don't expect this

  1   2   >