2 ms·
A very interesting way of making a book/"store of knowledge". I really really like this. Can these python interactive books be constructed to show and run code
by josephagoss 13y ago
A very interesting way of making a book/"store of knowledge".
I really really like this. Can these python interactive books be constructed to show and run code snippets of different languages?
- takluyver 13y agoYes, with a bit of glue code, you can have 'cell magics' to run code in another language. This notebook has examples with R code: http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipython/master/examples/notebooks/R%20Magics.ipynb http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipyt... There are extensions for Cython, Octave and C too. And there's a generic mechanism for scripting languages (%%script), but that only captures stdout, rather than moving objects between different languages.