On Friday, June 9, 2017 at 7:02:29 AM UTC-7, takowl wrote:
>
> On 8 June 2017 at 18:58, Brendan Barnwell <[email protected] <javascript:>
> > 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. 
> ;-)
>

Heh, right!  But like, is it possible to get the server to tell me its own 
PID? 

>  
>
>>   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.
>

As you said, the port can be obtained from the URL the browser is asked to 
load.  It would be nice, though, to have some kind of API that could be 
used to get at information about the server itself (rather than the 
kernels).  It seems like the main information missing is the PID of the 
server process itself.  I can see how this is not useful in many cases, 
though, since if the client is connecting from another computer it can't 
have much use for the PID.  And maybe the new /shutdown API is the only 
thing I really want to do with the PID anyway.  Any idea when 5.1 with that 
feature will be out? 

-- 
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/5ea42470-8c8e-4e3f-b2d1-2dfe82f9cf34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to