Show More
@@ -776,10 +776,12 b' class OSMagics(Magics):' | |||||
776 |
|
776 | |||
777 | The file will be overwritten unless the -a (--append) flag is specified. |
|
777 | The file will be overwritten unless the -a (--append) flag is specified. | |
778 | """ |
|
778 | """ | |
779 | line = line if len(line.split())==1 else '"%s"' % line.strip("\"\'") |
|
|||
780 | args = magic_arguments.parse_argstring(self.writefile, line) |
|
779 | args = magic_arguments.parse_argstring(self.writefile, line) | |
781 | filename = os.path.expanduser(args.filename.strip("\"\'")) |
|
780 | if re.match(r'[\'*\']|["*"]', args.filename): | |
782 |
|
781 | filename = os.path.expanduser(args.filename[1:-1]) | ||
|
782 | else: | |||
|
783 | filename = os.path.expanduser(args.filename) | |||
|
784 | ||||
783 | if os.path.exists(filename): |
|
785 | if os.path.exists(filename): | |
784 | if args.append: |
|
786 | if args.append: | |
785 | print("Appending to %s" % filename) |
|
787 | print("Appending to %s" % filename) |
General Comments 0
You need to be logged in to leave comments.
Login now