Re: storing variables *in* the notebook
Kiko <[email protected]> Fri, 27 Jan 2017 10:01:36 +0100
| Newsgroups | gmane.comp.python.ipython.devel |
|---|---|
| Message-ID | <CAB-sx61=8DBYJ5BTCQi3aKy7cKN7-o0uYwOE=oUNkr=jL5ycLg@mail.gmail.com> |
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,...
_______________________________________________
IPython-dev mailing list
[email protected]
https://mail.scipy.org/mailman/listinfo/ipython-dev