[IPython-dev] %%markdown or %loadmarkdown ?

Thomas Kluyver takowl at gmail.com
Fri Jul 18 13:29:33 EDT 2014


On 13 July 2014 13:27, Mark Bakker <markbak at gmail.com> wrote:

> I was wondering whether there is something like a %% markdown magic that
> changes a code cell to markdown.
>

There isn't, and it doesn't really make sense in our model. Magics change
how code is executed, while code cells vs. markdown cells is part of the
notebook document structure. The kernel, which executes the code, doesn't
know about the document.


> I want to use this with the %load command. So actually, a %loadmarkdown
> would be even better
>

> Usage: In class assignments I want the students to load exercises (written
> in markdown) from a server.
> Sure, I can let them do a %load and then manually change the cell to
> markdown, but it would be much nicer if it changes automatically.
>

I think the more common way of doing this is to provide the students with
notebooks which describe the exercises, and leave blank cells where they
fill in their answers. It would be possible to write a %loadmarkdown magic,
but it feels like the wrong approach - the notebook is built around the
idea of separating the document structure from code execution.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140718/3ad00479/attachment.html>


More information about the IPython-dev mailing list