[IPython-dev] How to get the notebook name/path in the kernel?

Konrad Hinsen konrad.hinsen at fastmail.net
Thu Feb 27 11:56:17 EST 2014

Thomas Kluyver writes:

 > Why does the provenance tracking need to happen in the kernel? The notebook server would
 > seem like the better place to do it.

Provenance tracking in ActivePapers is part of code execution. Every
time a codelet (the equivalent of a script in an ActivePaper) creates
a dataset, directly or through a call to library code, the
ActivePapers infrastructure notes the name of the codelet as a
dependency. Notebooks are just codelets with a user interface,
so the same rules apply.

There is no way to figure out which datasets a notebook creates just
by scanning its code, because the dataset could well be created in a
library function. The notebook manager has nothing but the static
code, so it can't handle provenance tracking.


More information about the IPython-dev mailing list