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

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

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

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 > >

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

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

Re: Clickable hyperlinks

2017-01-09 Thread Michael Torrie
, console, Tkinter could be used to create a console of your own that displays the output from other processes and implements clickable hyperlinks, but Tkinter itself does not display using standard out, and thus cannot cause a terminal emulator or Windows console to display hyperlinks in a click

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

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

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

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, >

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

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:

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 >

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

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
have access to some kind of an internet engine too. Except that you never mentioned anything about this in your posts before. It seemed to me you were asking about printing out clickable hyperlinks with python. Calling the OS to launch a browser to view a url is a different beast which i

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

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

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

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.

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

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 > >

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

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,

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

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

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
it becomes > *your* responsibility to create the window, populate it with > any buttons or text or scroll bars you want, and you can > choose to interpret text any way you like -- including as > clickable Hyperlinks. > > The bottom line is, there is no "a way" to do th

RE: Clickable hyperlinks

2017-01-06 Thread Steve D'Aprano
r console or terminal application it is running in. However, you can use Python to write GUI applications. Then it becomes *your* responsibility to create the window, populate it with any buttons or text or scroll bars you want, and you can choose to interpret text any way you like -- including a

RE: Clickable hyperlinks

2017-01-06 Thread Steve D'Aprano
opic and change 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 brea

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 >

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

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

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

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
wrote Netscape > Navigator, before it became Mozila and Firefox, so he knows > what he's talking about: > https://www.jwz.org/doc/threading.html The concept here is not so much that people start a new topic and change the subject, but that sometimes the topic just naturally evolves to the poi

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

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

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

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
he issue. This > message, for example appears under a long thread that started > out life as "mentor training python Romania with > certification" and then changed to "Cleaning up conditionals" > and then changed to "Clickable hyperlinks." All in one > thread

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

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

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

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

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

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
t life as "mentor training python Romania with certification" and then changed to "Cleaning up conditionals" and then changed to "Clickable hyperlinks." All in one thread. My client doesn't break them up because they all tie together via the message-id header. And

RE: Clickable hyperlinks

2017-01-06 Thread Deborah Swanson
were more robust. > As can be seen here for example: > https://mail.python.org/pipermail/python-> list/2017-January/thread.html > > Note how most threads start in the leftmost column and > replies are indented. But this does not occur where you began > the new subject: "

Re: Clickable hyperlinks

2017-01-06 Thread David
ail.python.org/pipermail/python-list/2017-January/thread.html Note how most threads start in the leftmost column and replies are indented. But this does not occur where you began the new subject: "Clickable hyperlinks". Thanks. -- https://mail.python.org/mailman/listinfo/python-list

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

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

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

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

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

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

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' <jeanpierr...@gmail.com> Cc: 'comp.lang.python' <python-list@python.org> Subject: RE: Re: Clickable hyperlinks

RE: Clickable hyperlinks

2017-01-05 Thread Dan Strohl via Python-list
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 <python-list@python.org> Subject: Re

Clickable hyperlinks

2017-01-05 Thread Deborah Swanson
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 clickable. --

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

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 wa

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

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 que

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

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

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

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
t; facilities. I'd recommend checking out the third-party > 'requests' module on PyPI. 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, and I tried with little success to change the

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

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:

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 >

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
have access to some kind of an internet engine too. Except that you never mentioned anything about this in your posts before. It seemed to me you were asking about printing out clickable hyperlinks with python. Calling the OS to launch a browser to view a url is a different beast which is why no o

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

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

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

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

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.

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

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*

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

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,

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
ite GUI applications. Then it becomes > *your* responsibility to create the window, populate it with > any buttons or text or scroll bars you want, and you can > choose to interpret text any way you like -- including as > clickable Hyperlinks. > > The bottom line is, there

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
st 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: Clickable hyperlinks +- RE: Cl

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 >

RE: Clickable hyperlinks

2017-01-04 Thread Steve D'Aprano
er console or terminal application it is running in. However, you can use Python to write GUI applications. Then it becomes *your* responsibility to create the window, populate it with any buttons or text or scroll bars you want, and you can choose to interpret text any way you like -- including a

RE: Clickable hyperlinks

2017-01-04 Thread Steve D'Aprano
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 breaking t

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

RE: Clickable hyperlinks

2017-01-04 Thread Deborah Swanson
issue. This > message, for example appears under a long thread that started > out life as "mentor training python Romania with > certification" and then changed to "Cleaning up conditionals" > and then changed to "Clickable hyperlinks." All in o

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

  1   2   >