On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:
Hello Lyxers
I wonder why LyX is not available to process little pieces of python code within its own framework, like ipython notebook for instance??

This feature allows us to have beautiful graphics such the one produced by matplotlib package. I know there already exists a similar binding for R through knitr module, so why not a binding for python too?? Is there a way, like modules or whatever, to achieve the same functionality or at least some basic functionality of ipython notebook within LyX??

Can you be more precise about what you want to do? I've never heard of ipython notebook.

Sweave works by our having an output format (sweave) for such documentsand then our declaring Rscript as a sweave --> LaTeX converter, so PDF export (say) goes via Rscript and pdflatex. There's a special script in lib/scripts/ that "sets up some things for LyX"first, or so it claims. It would be reasonably easy to do the same sort of thing for Python, if you wanted to do so. You'd just need to set up an appropriate format and then declare an appropriate script as a whatever -> latex converter. Then LyX will run the script and do as you wish with the embedded python code.

Of course, as we've discussed on the list with respect to R, there are large security issues here, too.

Richard

Reply via email to