Show More
@@ -513,8 +513,7 b' class CodeMagics(Magics):' | |||
|
513 | 513 | self.shell.hooks.editor(filename) |
|
514 | 514 | |
|
515 | 515 | # and make a new macro object, to replace the old one |
|
516 |
|
|
|
517 | mvalue = mfile.read() | |
|
516 | mvalue = Path(filename).read_text() | |
|
518 | 517 | self.shell.user_ns[mname] = Macro(mvalue) |
|
519 | 518 | |
|
520 | 519 | @skip_doctest |
@@ -704,8 +703,7 b' class CodeMagics(Magics):' | |||
|
704 | 703 | # XXX TODO: should this be generalized for all string vars? |
|
705 | 704 | # For now, this is special-cased to blocks created by cpaste |
|
706 | 705 | if args.strip() == 'pasted_block': |
|
707 | with filepath.open('r') as f: | |
|
708 | self.shell.user_ns['pasted_block'] = f.read() | |
|
706 | self.shell.user_ns['pasted_block'] = filepath.read_text() | |
|
709 | 707 | |
|
710 | 708 | if 'x' in opts: # -x prevents actual execution |
|
711 | 709 | print() |
General Comments 0
You need to be logged in to leave comments.
Login now