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
merged 1 commit into from Jan 6, 2019

Conversation

@tonyfast
Copy link
Contributor

@tonyfast tonyfast 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 .
@dsblank
Copy link
Contributor

@dsblank dsblank 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?

Loading

@tonyfast
Copy link
Contributor Author

@tonyfast tonyfast 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.

Loading

@Carreau
Copy link
Member

@Carreau Carreau commented Jan 6, 2019

Thanks ! Looks good.

Loading

@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
Loading
IPython/core/shellapp.py Show resolved Hide resolved
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants