Create notebook without file, or with temporary file?

43 views
Skip to first unread message

Brendan Barnwell

unread,
Aug 1, 2019, 2:46:15 AM8/1/19
to Project Jupyter
One thing I really miss in the Jupyter notebook is the ability to create a "scratch" notebook without having to worry about where the file is located or what it's named.  Often this is for some throwaway task.  Sometimes I may want to save it, but if so, I want to save it later.  The problem is that Jupyter requires me to create the notebook file first, and unless I explicitly delete it it will stick around in whatever directory I created it in, creating a clutter of one-off scratchpad notebooks.

In most ordinary desktop programs (like Word or whatever), you start by opening a document that is not connected with a file.  Later, if you want to save it, you specify the path and name at that time.  Jupyter does this backwards, where you have to choose the location and filename first before beginning to edit.

Is there any way to create a "floating" notebook that is not connected to an explicitly named file?  It's fine if it's secretly connected to a temporary file somewhere, but the point is I want to be able to hit one button for "new unnamed notebook" and get a notebook that will silently disappear (e.g., deleting the temp file) if I don't save it.

Jonathan Gutow

unread,
Aug 1, 2019, 1:38:38 PM8/1/19
to Project Jupyter
Have you looked at https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions? In particular the pop-up scratchpad extension might be what you are looking for.

Regards,
Jonathan

Afshin T. Darian

unread,
Aug 1, 2019, 7:35:06 PM8/1/19
to jup...@googlegroups.com
Hello!

You might find that the Code Console in JupyterLab serves as the "scratchpad" you are looking for:


Cheers!

-Darian

--
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 jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/47689bc1-21f2-48d8-b623-68104e5efff5%40googlegroups.com.

Brendan Barnwell

unread,
Aug 4, 2019, 7:15:51 PM8/4/19
to Project Jupyter
Thanks for those replies.

The popup scratchpad extension appears to be just a single cell and has to be launched from within a regular notebook that is already attached to a file, so that's not really a solution for me,

The Jupyterlab code console looks quite nice, but my experience has been that some things (especially related to plotting) don't yet work properly in Jupyterlab, or require more tweaking to get them to work.  However, I may take another look at Jupyterlab now that I now about the code console.
To unsubscribe from this group and stop receiving emails from it, send an email to jup...@googlegroups.com.

Afshin T. Darian

unread,
Aug 4, 2019, 8:08:33 PM8/4/19
to jup...@googlegroups.com
Hi Brendan,

JupyterLab 1.0 came out a month ago (latest release is 1.0.4) and hopefully most of the tools you're using will either work out box or have updated extensions that work with the `jupyter labextension install` command. Give it a spin and see what you think.

If you do run into issues, please feel free to:
Cheers!

-Darian

To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/0ee65ec8-7abf-4c0f-9984-19ee2fa681ab%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages