Forum Archive

What is command for console.write_link() on Python on PC?

[deleted]

Hi,

I have been playing with the console.write_link(). But i found out Python on the computer does not have the console module. So is there a way to do the console.write_link() function on the computer?

Or is there no way to do it?

Thanks

zipit

console.write_link is function of Pythonistas proprietary console module. You cannot reproduce that behaviour with a standard CPython (aka normal Python) installation since desktop shells usually do not support mouse interaction and therefore there is no such functionallity in CPython. However you can use a different Python platform on your desktop computer. IPython [1] is a very popular Python platform that has an interactive shell. IPython runs in the browser on a platform called Jupyter, so you could run IPython everywhere - on your iPad or iPhone for example.

[1] https://ipython.org

Phuket2

@sdushantha, some IDEs such as PyCharm just show URL's as a clickable link when printing to the terminal. I would imagine others editors such as Atom does also. Pythonista also prints a clickable link to the terminal if it see's what appears to be a URL. Just with the std print('www.hp.com') for example.
Hope that's helpful.