On 8 June 2017 at 18:58, Brendan Barnwell <[email protected]> wrote:

> One thing I'm wondering is whether there's a way to get any of this
> information by communicating with the notebook server itself.
>

Most stuff can be done by communicating with the server. Finding out how to
communicate with it, such as what port it's running on, obviously can't. ;-)


>   It would be nice if I could write my wrapper so it really acted as a
> browser from Jupyter's perspective, with the notebook starting it rather
> than the other way around.  The reason I'd feel more comfortable with this
> is that it would make the wrapper more independent of Jupyter, and thus (I
> hope) more robust to a situation where the wrapper is, for instance,
> running on a different version of Python than the notebook itself.
>

This is a sensible rationale. At the moment, I don't think that a browser
launched by the notebook server has any specific knowledge of that, except
for the URL it's asked to load.

If it's useful, I think we could add an environment variable when we launch
the browser, like JUPYTER_NOTEBOOK_PORT, so that a special-purpose browser
like yours could use that. You can probably get that information from the
URL, though.


> For instance, I'd like it if I could have my wrapper installed in just one
> Python environment (an Anaconda environment, say), but be able to run
> notebooks from arbitrary Python versions.  If I call list_running_servers
> from one Python process, is it guaranteed to show me all servers, even if
> they're running on different versions of Python?
>

Yes, it should find all notebook servers run by the current user on the
current filesystem. That includes different versions of Python, conda envs
and virtualenvs, but not VMs or docker containers (unless the relevant
directories are part of a bind mount).

Thomas

-- 
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/CAOvn4qh4nhGmMf8sGkccENDDnzy_UMBYRHSLH7qXkYyTCdsrGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to