Hi DG On Mon, Feb 6, 2017 at 8:12 PM, DG <[email protected]> wrote: > Carol, > thanks a lot for your informative and fast reply. > > Unfortunately, that's not what I am looking for. I need to get the port > number from within an IPython cell. Maybe this isn't the right forum for > this kind of question--I will try posting on the IPython group.
That's seem like a strange thing to want, can you clarify your needs and what you are trying to accomplish ? Are you sure you want to get the notebook server port ? Or are you looking for the ZMQ connect info ? If the former, then you will need really weird hack (like publishing javascript which lookup document.url and send it back to the kernel), or make some shady assumption and peeking at /proc/$pid/ and uses some heuristic. If the later you can use `%connect_info` magic when running the IPython kernel, it should print the relevant informations. Hope thats help, but a description of what you are trying to accomplish might help. -- M -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CANJQusUf8B-F0uBxFhSHU7%3DhX524tzrLYVmCRmD2hEFfvankPQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
