##// END OF EJS Templates
Let nbformat take care of opening the file...
Thomas Kluyver -
Show More
@@ -2501,8 +2501,7 b' class InteractiveShell(SingletonConfigurable):'
2501 """generator for sequence of code blocks to run"""
2501 """generator for sequence of code blocks to run"""
2502 if fname.endswith('.ipynb'):
2502 if fname.endswith('.ipynb'):
2503 from nbformat import read
2503 from nbformat import read
2504 with io_open(fname) as f:
2504 nb = read(fname, as_version=4)
2505 nb = read(f, as_version=4)
2506 if not nb.cells:
2505 if not nb.cells:
2507 return
2506 return
2508 for cell in nb.cells:
2507 for cell in nb.cells:
General Comments 0
You need to be logged in to leave comments. Login now