<div dir="ltr"><div>Nbconvert now includes an execute preprocessor which executes a notebook, recording the outputs back into that notebook. This is based on runipy, which Zoltán mentioned, and you can use it either from Python code or at the command line (ipython nbconvert --execute ...).<br><br><a href="https://github.com/ipython/ipython/blob/master/IPython/nbconvert/preprocessors/execute.py">https://github.com/ipython/ipython/blob/master/IPython/nbconvert/preprocessors/execute.py</a><br><br></div>Thomas<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 March 2015 at 09:11, Ana Nelson <span dir="ltr"><<a href="mailto:ana@ananelson.com" target="_blank">ana@ananelson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm creating notebooks via nbformat following the pattern of Fernando's v4 gist:<div><a href="http://nbviewer.ipython.org/gist/fperez/b3ab79a32b0e4777a646" target="_blank">http://nbviewer.ipython.org/gist/fperez/b3ab79a32b0e4777a646</a><br></div><div><br></div><div>(BTW it might be helpful to link to the new gist from the older version here <a href="http://nbviewer.ipython.org/gist/fperez/9716279" target="_blank">http://nbviewer.ipython.org/gist/fperez/9716279</a>)</div><div><br></div><div>I'd like to run a command line script to populate the outputs in this notebook so that when a user opens the generated notebook, it has already been run.</div><div><br></div><div>I thought that might have been the intention of the ipython -c '%run test.ipynb' command, but that doesn't seem to have any effect. Am I doing something wrong or is there some other command I should be calling?</div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>