Run a notebook from console
Certainly a stupid question but is it possible to run a notebook from console? And how ?
Assuming that the notebook is foo.ipynb
, you can type:
$ sage -n jupyter foo.ipynb
Once you close the notebook, the Jupyter server remains active. To open a new notebook, you can type https://localhost:xxxx
( where xxxx
usually is 8888) in your default browser and access the Jupyter landing page. If you want to finish working, you should stop manually the server.
EDIT (to answer @Cyrille's comment): You can do this:
foo.ipynb
, in Jupyter.foo.py
somewhere in your computer (probably in the Downloads folder)foo.py
to foo.sage
cd C:\path\to\folder
to go to the folder where foo.sage
is locatedsage
foo.sage
by typing load("foo.sage")
Thanks for your answer but (I am under Windows10) I donot know how to type the path C:/toto/ C:\toto... Secondly my question was, and I recognize, it was not crystal clear :" could I run an ipynb without recourse to jupiter"
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 5 years ago
Seen: 842 times
Last updated: May 09 '20
Notebook List Object Data Storage/Retrieval? (Start/Restart)
Short Cython Example In A Notebook Cell?
What happens in insecure mode?
Is notebook() mutually-exclusive from "./sage -gdb" mode?
Can I pause a computation rather than aborting it? (Interrupt Command)
What state is preserved when I close a running notebook browser window?