[IPython-dev] magics and metadata
jonathan.taylor at stanford.edu
Fri Jun 22 03:41:09 EDT 2012
> The trick is to find a clean way of expressing this that happens:
> 1. before execution of the cell. Highlighting isn't very useful by the
> time the cell has been run
Fair enough, but the browser can update the highlighting if it is told
(after execution) that it is a %%bash cell. So, after execution, the
highlighting would look OK (much like after rendering markdown looks like
> 2. keeping the separation between kernels and notebooks we currently
> have. Keep in mind that the kernel has *no idea* that it's being
> called by a notebook, all it knows is that it was given a chunk of
> code to run.
Each chunk can be thought of as a cell. In the console, a chunk would be
either one line or a multiline input, much as cell magics work in the
console right now.
Some frontends could use the metadata associated
to that chunk, others might not.
I don't know the internals of the console that well, but how different is
it to the logic
in Min's test script for a notebook (https://gist.github.com/2620876)? If
goes through something like line 32 in that file, then it seems like it is
reasonable to have
a msg that is a "metadata" for that last execute request. This script has
no notebook, but I would be happy
if I could send the iochannel some metadata (via the shell channel) for the
last execute request.
What would be needed is for the execute request to generate some "metadata"
Dept. of Statistics
Sequoia Hall, 137
390 Serra Mall
Stanford, CA 94305
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev