Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the IPython command line to run *.ipynb files #11529

merged 1 commit into from Jan 6, 2019


Copy link

commented Dec 12, 2018

This PR allows _exec_file in the shell app to pass ipynb files to safe_execfile_ipy in the interactiveshell. safe_execfile_ipy already has the machinery to consume notebooks.

Allow the IPython command line to run *.ipynb files .

This comment has been minimized.

Copy link

commented Dec 26, 2018

Does this only work if the notebook has a Python kernel? If this PR isn't accepted, what is the recommended way of running a notebook?


This comment has been minimized.

Copy link
Contributor Author

commented Dec 30, 2018

This approach will only work for an IPython interactive shell. The run_cell method is invoked so all of the interactive shell rules apply.

The current way of running notebooks is using nbconvert with the --execute flag. The runipy project is deprecated, and recommends the nbconvert approach. Some other ways to acheive a similar result is with importnb or papermill.


This comment has been minimized.

Copy link

commented Jan 6, 2019

Thanks ! Looks good.

@Carreau Carreau added this to the 7.3 milestone Jan 6, 2019

@Carreau Carreau merged commit 7263f83 into ipython:master Jan 6, 2019

4 checks passed

codecov/patch 0% of diff hit (target 0%)
codecov/project 68.33% (-0.01%) compared to a8165da
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.