diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index ed915c3..91fe12c 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2568,7 +2568,8 @@ class InteractiveShell(SingletonConfigurable): if not nb.worksheets: return for cell in nb.worksheets[0].cells: - yield cell.input + if cell.cell_type == 'code': + yield cell.input else: with open(fname) as f: yield f.read()