[IPython-User] Python code in a markdown cell

Michael Hadmack hadmack@gmail....
Tue Apr 10 11:27:04 CDT 2012


Thanks for your response Brian.  As far as i'm concerned the Markdown
fields shouldn't update anything unless you execute that cell.  Although it
would be preferable for the original python to be retained in whatever
markup so that it can be re-executed later, much like how LaTeX is handled
now.  I have looked into extending the IPython markdown parsing system but
it seems to be a borrowed JS library full of regex black magic.  Are there
any plans to re-implement the parser in pure python to be called from JS in
the notebook and be extendable?

-Mike

On Tue, Apr 10, 2012 at 5:51 AM, Brian Granger <ellisonbg@gmail.com> wrote:

> Mike,
>
> We have thought about this, but don't have a solution yet.  There are
> some subtle issues involved, especially if you want to keep the field
> updated as the corresponding python object changes.
>
> Cheers,
>
> Brian
>
> On Mon, Apr 9, 2012 at 3:36 PM, Michael Hadmack <hadmack@hawaii.edu>
> wrote:
> > Hi All,
> >
> > Is there a way that you can execute python code from within a markdown
> cell?
> >  For example I want to refer to the value a result from an earlier python
> > cell from within my markdown text.  Presently I just copy and paste but I
> > would like to do this dynamically.  Really what I suppose is needed is a
> new
> > markdown tag that will pass the contents to IPython.display() via
> > Javascript??.  Thanks.
> >
> > -Mike
> >
> >
> > _______________________________________________
> > IPython-User mailing list
> > IPython-User@scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-user
> >
>
>
>
> --
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> bgranger@calpoly.edu and ellisonbg@gmail.com
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120410/9a76e55a/attachment.html 


More information about the IPython-User mailing list