[IPython-dev] storing variables *in* the notebook
Thomas Kluyver
takowl at gmail.com
Wed Jan 25 17:20:36 EST 2017
On 25 January 2017 at 21:33, Zoltán Vörös <zvoros at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170125/44afb54d/attachment.html>
More information about the IPython-dev
mailing list