[IPython-dev] storing variables *in* the notebook

Kiko kikocorreoso at gmail.com
Fri Jan 27 04:01:36 EST 2017


Hi all,

My 2 cents...

Why not store that in the notebook metadata? something like:

x = [1,2,3]
%store_in_notebook x # Would add the info to the notebook metadata

that is added to:

{
  kernelspec: {...}
  stored:{
    x: [1,2,3]
  }
}

This way data can be checked before restoring it in the notebook and you
could restore just one var o all of them

%store_in_notebook -restore x # would read the notebook metadata

or

%store_in_notebook -restore_all # would read the notebook metadata

Of course, this only would be useful for very basic types: strings,
integers, floats, dicst, lists,...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170127/482fbd78/attachment.html>


More information about the IPython-dev mailing list