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?
Wil On Thursday, August 3, 2017 at 12:03:35 PM UTC-7, takowl wrote: > > 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. > > 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. > > If 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. > > Thomas > > On 3 August 2017 at 19:41, Wil C <[email protected] <javascript:>> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/a1b16305-9ba7-4f91-afae-640ec45c85cc%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jupyter/a1b16305-9ba7-4f91-afae-640ec45c85cc%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/a6e574c2-f56c-4f15-b89c-84ad392daf9b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
