##// END OF EJS Templates
clarify %%file docstring...
MinRK -
Show More
@@ -699,7 +699,7 b' class OSMagics(Magics):'
699 @magic_arguments.magic_arguments()
699 @magic_arguments.magic_arguments()
700 @magic_arguments.argument(
700 @magic_arguments.argument(
701 '-a', '--amend', action='store_true', default=False,
701 '-a', '--amend', action='store_true', default=False,
702 help='Open file for amending if it exists'
702 help='Open file for amending if it exists, instead of overwriting.'
703 )
703 )
704 @magic_arguments.argument(
704 @magic_arguments.argument(
705 'filename', type=unicode,
705 'filename', type=unicode,
@@ -709,7 +709,8 b' class OSMagics(Magics):'
709 def file(self, line, cell):
709 def file(self, line, cell):
710 """Write the contents of the cell to a file.
710 """Write the contents of the cell to a file.
711
711
712 For frontends that do not support stdin (Notebook), -f is implied.
712 The file will be overwritten if it exists, unless the `-a` flag is passed,
713 in which case the file will be amended.
713 """
714 """
714 args = magic_arguments.parse_argstring(self.file, line)
715 args = magic_arguments.parse_argstring(self.file, line)
715 filename = os.path.expanduser(unquote_filename(args.filename))
716 filename = os.path.expanduser(unquote_filename(args.filename))
General Comments 0
You need to be logged in to leave comments. Login now