0

I'm making a project on Jupyter notebook that requires me to keep track of the number in the localhost url, and I currently get this number by having a pop-up window where the user needs to types it in. However, I want to see if there's a way to skip this step and automatically get the url when the notebook runs. Does anyone know if there is a function or some other way that I can do this?

Edit: to clarify, when I open my Jupyter notebook, it runs in a Google Chrome window with the url localhost:8888 (or some other 4 digit number) followed by the path to the folder the notebook is in. I want to see if there is a way for the notebook to read that number or the entire url.

  • 1
    I don't understand what you mean. Where does the number come from? Is that the server's port number? Perhaps you should show an example. – Tim Roberts Aug 02 '23 at 20:15
  • "Automatically get the url" from what? – JNevill Aug 02 '23 at 20:22
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 02 '23 at 20:28
  • Have you seen this: https://github.com/davidbrochart/ipyurl – Z Li Aug 02 '23 at 21:24
  • 1
    might be a duplicate of https://stackoverflow.com/questions/65475868/get-base-url-of-current-jupyter-server-ipython-is-connected-to – Z Li Aug 02 '23 at 21:25
  • This is probably what you want (duplicate): https://stackoverflow.com/questions/41782255/how-to-get-the-current-jupyter-notebook-servers-in-python – LarsJaeger Aug 02 '23 at 21:32

0 Answers0