In short: don't use NbConvertApp. The application machinery is there to
support the command line interface. If you're using it from Python code,
use an exporter object instead, as described here:

http://nbconvert.readthedocs.io/en/latest/nbconvert_library.html

On 28 September 2017 at 22:00, Rick Gerkin <[email protected]> wrote:

> I am trying to use the Python API to convert notebooks from within a
> program.  I have no problem using the command line nbconvert, but can't
> find any examples anywhere of NbConvertApp used (rather than documented).
> Does someone know what the Python equivalent of this command line statement
> would be:
>
> jupyter nbconvert --to python my_notebook.ipynb
>
> I am trying things like:
>
> from nbconvert import nbconvertapp
> x.convert_single_notebook('my_notebook.ipynb')
>
> but am getting errors that do not occur on the command line.  It would be
> useful if the documentation had a few or even one example(s) of this API in
> use.
>
> Thanks,
> Rick
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/ea407c58-af56-499c-92ff-5b10957270db%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/ea407c58-af56-499c-92ff-5b10957270db%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qgkgPkZeSpYZv1yF3rBxjv8nymHeA5hkWi4g2GCakY38Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to