[IPython-dev] running/getting output into a new programmatically-generated notebook

Thomas Kluyver takowl at gmail.com
Mon Mar 23 18:38:41 EDT 2015


On 23 March 2015 at 15:12, Antonino Ingargiola <tritemio at gmail.com> wrote:

> Sorry for jumping in, for completeness sake (and future reference), how do
> we change the timeout in same thread when using ExecutePreprocessor()?
>

You can pass in timeout= as a keyword argument when creating it, or set it
as an attribute on the preprocessor instance.

E.g.

nb = nbformat.read(nbPath, as_version=4)
ep = ExecutePreprocessor(timeout=None)   # Option 1
ep.timeout = 60  # Option 2
ep.preprocess(nb, {'metadata': {'path': nbPath}})
nbformat.write(nb, nbPath)

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


More information about the IPython-dev mailing list