From 7263f834c924a68981a3f30f1207fd7528e23af2 2019-01-06 17:50:24 From: Matthias Bussonnier Date: 2019-01-06 17:50:24 Subject: [PATCH] Merge pull request #11529 from tonyfast/run-ipynb-cli Allow the IPython command line to run *.ipynb files --- diff --git a/IPython/core/shellapp.py b/IPython/core/shellapp.py index 1cbe931..a09192f 100644 --- a/IPython/core/shellapp.py +++ b/IPython/core/shellapp.py @@ -329,7 +329,7 @@ class InteractiveShellApp(Configurable): # behavior. with preserve_keys(self.shell.user_ns, '__file__'): self.shell.user_ns['__file__'] = fname - if full_filename.endswith('.ipy'): + if full_filename.endswith('.ipy') or full_filename.endswith('.ipynb'): self.shell.safe_execfile_ipy(full_filename, shell_futures=shell_futures) else: