--
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+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/a1b16305-9ba7-4f91-afae-640ec45c85cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ThomasIf you're feeling adventurous, there are tools that do checkpoint-restart, which work at a lower level than Python to snapshot the whole of a process so you can resume it later.The dill package (https://pypi.python.org/pypi/dill ) has functions to save and restore all the variables in a session. But be aware that there are some things (like open file handles or sockets) which can't really be saved.Hi Wil,There's nothing quite like that built into IPython or Jupyter, although the %store magic in IPython can be used to save individual variables.
On 3 August 2017 at 19:41, Wil C <iam...@gmail.com> wrote:
Hi all,In the course of a normal use of a notebook, the output of each cell is saved when the notebook is saved. However, if I closed the notebook and opened it again, the variables in the namespace all go away (presumably because the kernel was restarted). Is there a way to save the variables in a kernel namespace and load it again, so I don't have to go through and run every cell?Wil
--
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.
I looked into this a little afterwards, and I was thinking about it solely from an iPython perspective. Shouldn't I be able to just traverse all the variables in the Python space using reflection, and store them all with Pickle and Shelf? And then restore it when a new notebook is started?
--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/k3oC4ANRxW0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAOvn4qhmZUbY7mhMKVNvunbwqyhouY6-wkA0VJtudwGK42kNaQ%40mail.gmail.com.
Ah! Dill is so much better, and exactly what I was looking for. It's able to save and load the entire python interpreter session. Thanks!Wil
On Fri, Aug 4, 2017 at 12:46 AM, Thomas Kluyver <tak...@gmail.com> wrote:
On 4 August 2017 at 00:48, Wil C <iam...@gmail.com> wrote:I looked into this a little afterwards, and I was thinking about it solely from an iPython perspective. Shouldn't I be able to just traverse all the variables in the Python space using reflection, and store them all with Pickle and Shelf? And then restore it when a new notebook is started?Yep. This is essentially what dill is doing. Dill also extends pickle to cover some things that pickle can't normally handle.
--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/k3oC4ANRxW0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAOvn4qhmZUbY7mhMKVNvunbwqyhouY6-wkA0VJtudwGK42kNaQ%40mail.gmail.com.