open an editor with the macro data in a file
(self,mname,macro)
| 507 | return filename, lineno, use_temp |
| 508 | |
| 509 | def _edit_macro(self,mname,macro): |
| 510 | """open an editor with the macro data in a file""" |
| 511 | filename = self.shell.mktempfile(macro.value) |
| 512 | self.shell.hooks.editor(filename) |
| 513 | |
| 514 | # and make a new macro object, to replace the old one |
| 515 | with open(filename) as mfile: |
| 516 | mvalue = mfile.read() |
| 517 | self.shell.user_ns[mname] = Macro(mvalue) |
| 518 | |
| 519 | @skip_doctest |
| 520 | @line_magic |
no test coverage detected