[IPython-dev] How to get the notebook name/path in the kernel?
Konrad Hinsen
konrad.hinsen at fastmail.net
Fri Feb 28 02:36:52 EST 2014
Thomas Kluyver writes:
> I think I see - you're tracking both code and datasets. Only the
> kernel knows about the provenance and use of data, while only the
> notebook server knows about the provenance of code. Is that right?
Mostly. There is actually no fundamental difference between code and
datasets. Code is just another piece of data. It's perfectly
envisageable to have a compiler or preprocessor inside the
ActivePapers framework that generates "code" which is then executed.
There isn't much use for this in the Python edition because there
aren't many code generators that produce Python code, but in the
original JVM edition of ActivePapers, this is quite useful.
> I think I'd still be inclined to deal with provenance in the
> notebook server. I think it should be possible to make the kernel
Before discussing the pros and cons of dealing with provenance
tracking on one or the other side, I need to figure out what the
options are. Passing information from the kernel to the notebook
manager seems no easier to me than going in the other direction.
The fundamental problem is that both run in distinct processes and
don't even communicate directly. If I understand the architecture
correctly, it's only the SessionManager who knows about both sides.
So my immediate question is: how can I get the SessionManager to
mediate information between the kernel and the notebook manager?
Konrad.
More information about the IPython-dev
mailing list