Show More
@@ -2060,6 +2060,7 b' class InteractiveShell(SingletonConfigurable):' | |||||
2060 | mman.register_alias('rep', 'recall') |
|
2060 | mman.register_alias('rep', 'recall') | |
2061 | mman.register_alias('SVG', 'svg', 'cell') |
|
2061 | mman.register_alias('SVG', 'svg', 'cell') | |
2062 | mman.register_alias('HTML', 'html', 'cell') |
|
2062 | mman.register_alias('HTML', 'html', 'cell') | |
|
2063 | mman.register_alias('file', 'fwrite', 'cell') | |||
2063 |
|
2064 | |||
2064 | # FIXME: Move the color initialization to the DisplayHook, which |
|
2065 | # FIXME: Move the color initialization to the DisplayHook, which | |
2065 | # should be split into a prompt manager and displayhook. We probably |
|
2066 | # should be split into a prompt manager and displayhook. We probably |
@@ -707,12 +707,12 b' class OSMagics(Magics):' | |||||
707 | help='file to write' |
|
707 | help='file to write' | |
708 | ) |
|
708 | ) | |
709 | @cell_magic |
|
709 | @cell_magic | |
710 |
def f |
|
710 | def fwrite(self, line, cell): | |
711 | """Write the contents of the cell to a file. |
|
711 | """Write the contents of the cell to a file. | |
712 |
|
712 | |||
713 | The file will be overwritten unless the -a (--append) flag is specified. |
|
713 | The file will be overwritten unless the -a (--append) flag is specified. | |
714 | """ |
|
714 | """ | |
715 |
args = magic_arguments.parse_argstring(self.f |
|
715 | args = magic_arguments.parse_argstring(self.fwrite, line) | |
716 | filename = os.path.expanduser(unquote_filename(args.filename)) |
|
716 | filename = os.path.expanduser(unquote_filename(args.filename)) | |
717 |
|
717 | |||
718 | if os.path.exists(filename): |
|
718 | if os.path.exists(filename): |
General Comments 0
You need to be logged in to leave comments.
Login now