Show More
@@ -184,6 +184,7 b' import re' | |||
|
184 | 184 | import shlex |
|
185 | 185 | import sys |
|
186 | 186 | import pygments |
|
187 | from pathlib import Path | |
|
187 | 188 | |
|
188 | 189 | from IPython.utils.text import marquee |
|
189 | 190 | from IPython.utils import openpy |
@@ -404,7 +405,7 b' class Demo(object):' | |||
|
404 | 405 | |
|
405 | 406 | filename = self.shell.mktempfile(self.src_blocks[index]) |
|
406 | 407 | self.shell.hooks.editor(filename,1) |
|
407 |
with open(filename, |
|
|
408 | with open(Path(filename), "r") as f: | |
|
408 | 409 | new_block = f.read() |
|
409 | 410 | # update the source and colored block |
|
410 | 411 | self.src_blocks[index] = new_block |
General Comments 0
You need to be logged in to leave comments.
Login now