question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python extension output hyperlinks

See original GitHub issue

Issue Type: Feature Request

Directed here by @rchiodo from this StackOverflow post

To reiterate:

The code below correctly displays the hyperlinks to the Jupyter Server running remotely or locally. However, even though the mouse cursor changes from an arrow-cursor to the hand cursor, I cannot follow the link by either clicking on it or ctrl+clicking on it.

What do I need to do to be able to follow hyperlinks displayed in the VS Code Python extension’s Interactive Python pane?

from IPython.display import display, Markdown
from subprocess import Popen, PIPE
import pandas as pd

process = Popen(['powershell', 'jupyter notebook list'], stdout=PIPE, stderr=PIPE)
stdout, stderr = process.communicate()

jupy = stdout.decode('utf-8')\
        .replace('Currently running servers:\r\n', '')\
        .strip()\
        .split('\r\n')

jupy = [item.split(' :: ')[0] for item in jupy]
# jupy = ['<a href="{}">{}</a>'.format(item, item) for item in jupy]

for link in jupy:
    display(Markdown('[{}]'.format(link)))

VS Code version: Code 1.31.1 (1b8e8302e405050205e69b59abb3559592bb9e60, 2019-02-12T02:20:54.427Z) OS version: Windows_NT x64 10.0.17134

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
RossBencinacommented, Jun 5, 2019

Here is a simpler test case to work with:

#%%
from IPython.display import display, Markdown
display(Markdown('[<a href="https://code.visualstudio.com/">code.visualstudio.com</a>]'))

It displays a clickable URL, and the hover cursor is correct. But clicking or control-clicking the link does nothing.

0reactions
amungercommented, Dec 5, 2022

this works now

Read more comments on GitHub >

github_iconTop Results From Across the Web

python extension output hyperlinks · Issue #1576 - GitHub
To reiterate: The code below correctly displays the hyperlinks to the Jupyter Server running remotely or locally. However, even though the mouse ...
Read more >
Ship Python Extension that required dynamic linking
I am writing a c extension (called my_ext ) and I successfully compiled the source code to a .so file. However, my_ext depends...
Read more >
1. Extending Python with C or C++ — Python 3.11.1 ...
Extending Python with C or C++¶. It is quite easy to add new built-in modules to Python, if you know how to program...
Read more >
Extract all the URLs from the webpage Using Python
Here we want to Extracting URLs and save as CSV files. sowe just iterate through the list of all those links and print...
Read more >
Add Links — RST | Sphinx | Sublime | GitHub documentation
With this extension, links to external web pages are stored in a top-level folder. Each link is stored in its own .py file....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found