On Sat, Jan 16, 2016 at 8:53 PM, Ivan Andrus <[email protected]> wrote:
> To adapt to the soon-to-be-default Jupyter notebook in Sage, I’m updating the 
> Mac app to launch either SageNB or Jupyter depending on a preference.  
> Unfortunately, I can’t figure out how to determine if Jupyter is already 
> running at all, let alone in a given directory or on what port.  I can scrape 
> the log if I’m the one who started the server, but I would like to check if 
> they have started it some other way.  Does anyone know how to do that?
>

I hit the same problem.   I wrote a script that tracks the pid, etc.,
for Jupyter, which is used by SMC extensively:
   
https://github.com/sagemathinc/smc/blob/master/src/smc_pyutil/smc_pyutil/jupyter_notebook.py

As it says in the comments in the scripts, some things I do in there
are *HIDEOUS*.  I'm not happy with it at all in terms of being "good
code".  It does work OK though, and is fairly battle tested.

> Also, I’m thinking of making ~/Documents/Sage the default directory to run 
> Jupyter in.  Does that seem reasonable to everyone?
>

In SMC, I start the Jupyter server in $HOME.    Then when users open
the file browser in Jupyter, they see their home directory, and can
browse to any of their files.

 -- William

> -Ivan
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" 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].
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" 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].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to