Open URL in new tab from IPython Notebook/Jupyter cell

Mike

Is there a way to cause a programmatically generated url to open in a new browser tab or window from an IPython notebook cell?

Upon execution of the notebook cell the result should be the opening of a new tab or window pointing to the generated link.

NOTE: When I just return an IPython.core.display.HTML instance with a hyperlink the link is broken. If the url is copied and pasted into a browser window it is valid.

Mike Müller

When you work with your standard browser, you can use the webbrowser module:

import webbrowser

# generate an URL
url = 'https://' + 'www.google.com'
webbrowser.open(url)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Force a URL to open in a new tab

From Dev

Conditionally open url in new tab

From Dev

Force a URL to open in a new tab

From Dev

How to open url in new tab from JavaScript script

From Dev

How to open the previous url from the history in a new tab in Vimperator

From Java

Open a URL in a new tab (and not a new window)

From Dev

Zkoss - open url in browser's new tab

From Dev

Simple Chrome Extension : Open an url in a new tab

From Dev

Highlight text, drop it and open new tab url

From Dev

Open a PDF in new tab from URL from my MVC Controller [EDITED]

From Dev

How to open page in new tab from GridView?

From Dev

How to open a terminal in new tab from VIM?

From Dev

Open URLs in a new tab from command line

From Dev

How open the new tab from IE

From Dev

How to open page in new tab from GridView?

From Dev

Prevent Chrome for iOS from opening "Open in New Tab .. Copy Link URL" pop-up

From Dev

How to open a database stored URL from Reporting Services Report in a new tab

From Dev

Selenium won't open a new URL in a new tab (Python & Chrome)

From Dev

Open page in new tab/window AND direct current window to a new url

From Dev

Read a URL from a file and open it in a Firefox tab

From Dev

why is window.open(url) opening new window instead of tab

From Dev

How to make Google marker url open in a new browser window or tab?

From Dev

How do I open an url in a new tab via php?

From Dev

How to make Google marker url open in a new browser window or tab?

From Dev

Open link new window (not tab) with JavaScript without typing the URL twice?

From Dev

Form field functionality - Preview button will open the given url in new tab

From Dev

Open URL in new browser tab when click on HTML button

From Dev

Excel: populate a new column by bringing in the corresponding cell from another tab

From Dev

open a new tab in RSelenium

Related Related

  1. 1

    Force a URL to open in a new tab

  2. 2

    Conditionally open url in new tab

  3. 3

    Force a URL to open in a new tab

  4. 4

    How to open url in new tab from JavaScript script

  5. 5

    How to open the previous url from the history in a new tab in Vimperator

  6. 6

    Open a URL in a new tab (and not a new window)

  7. 7

    Zkoss - open url in browser's new tab

  8. 8

    Simple Chrome Extension : Open an url in a new tab

  9. 9

    Highlight text, drop it and open new tab url

  10. 10

    Open a PDF in new tab from URL from my MVC Controller [EDITED]

  11. 11

    How to open page in new tab from GridView?

  12. 12

    How to open a terminal in new tab from VIM?

  13. 13

    Open URLs in a new tab from command line

  14. 14

    How open the new tab from IE

  15. 15

    How to open page in new tab from GridView?

  16. 16

    Prevent Chrome for iOS from opening "Open in New Tab .. Copy Link URL" pop-up

  17. 17

    How to open a database stored URL from Reporting Services Report in a new tab

  18. 18

    Selenium won't open a new URL in a new tab (Python & Chrome)

  19. 19

    Open page in new tab/window AND direct current window to a new url

  20. 20

    Read a URL from a file and open it in a Firefox tab

  21. 21

    why is window.open(url) opening new window instead of tab

  22. 22

    How to make Google marker url open in a new browser window or tab?

  23. 23

    How do I open an url in a new tab via php?

  24. 24

    How to make Google marker url open in a new browser window or tab?

  25. 25

    Open link new window (not tab) with JavaScript without typing the URL twice?

  26. 26

    Form field functionality - Preview button will open the given url in new tab

  27. 27

    Open URL in new browser tab when click on HTML button

  28. 28

    Excel: populate a new column by bringing in the corresponding cell from another tab

  29. 29

    open a new tab in RSelenium

HotTag

Archive