Re: storing variables *in* the notebook

Thomas Kluyver <[email protected]> Wed, 25 Jan 2017 22:20:36 +0000
Newsgroups gmane.comp.python.ipython.devel
Message-ID <CAOvn4qiK-vgVVgOWO0cfB5hjNDb04GvYeA_G4o83A2nZnSm5wA@mail.gmail.com>
On 25 January 2017 at 21:33, Zoltán Vörös <[email protected]> wrote:

> Now, the standard answer to this problem is the %store magic, but that has
> at least two problems (one is actually more like a feature). First, as far
> as I understand, it saves the variable into a separate file, therefore, the
> notebook itself is not "portable" anymore: if I want to give it to someone,
> or use it on another computer, then I need the extra file, but then I could
> just save the variable in a file in the first place.


In many cases, we think that the unit of sharing should be a directory
containing notebooks and associated data files, rather than a notebook
itself. Storing and retrieving data in a notebook would require breaking
the abstraction that the code inside a notebook doesn't know about the
document it's part of.

ActivePapers is a different take on connecting code and data which does
package them in a single file; I believe it has some support for using a
Jupyter notebook as part of an ActivePaper:
https://github.com/khinsen/activepapers-python

Thomas

_______________________________________________
IPython-dev mailing list
[email protected]
https://mail.scipy.org/mailman/listinfo/ipython-dev