1

Is there are a way to save the Ipython notebook as an ipynb file from a cell within that notebook?

I know I can save it at any time by manually pressing "CTRL-M S", but I would like to use a command in a cell to do so (python command or %magic). In this way I could "Run all cells" and be sure that the output (e.g. inline figures) is saved into the notebookfile when the execution is finished.

Update: Current versions of the Jupyter notebook (the successor of the IPython notebook) autosave into a hidden folder every few minutes (This feature was in development when I asked the question - see accepted answer).

1 Answer 1

1

No, because the kernel does not know it is accessed from a notebook. Dev version have auto-save feature though, and you could write a javascript extension that listen for cell execution event. But Python is not the way to do it. (or display(Javascript('js-code-to-save-notebook')) in the last cell, but I did not tell you)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.