On 9 October 2016 at 14:47, John Kitchin <[email protected]> wrote:

> I did manage to do it with something like:
>
> import os
> os.system('jupyter notebook example.ipynb')
>
> but it seems like that is not the best approach.
>

That's more or less the approach I'd use. I'd recommend using the
subprocess module rather than os.system, so you can avoid dealing with
quoting filenames:

subprocess.Popen(['jupyter', 'notebook', filename])

You could launch the notebook server inside the existing process, but
there's no clear advantage to doing so.

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

Reply via email to