From 8fcce724848bf39f673adbacac150c706d6c17ce 2013-03-04 19:52:24 From: MinRK Date: 2013-03-04 19:52:24 Subject: [PATCH] expanduser on %%file targets closes #2993 --- diff --git a/IPython/core/magics/osm.py b/IPython/core/magics/osm.py index 6c9da55..cbba198 100644 --- a/IPython/core/magics/osm.py +++ b/IPython/core/magics/osm.py @@ -711,7 +711,7 @@ class OSMagics(Magics): For frontends that do not support stdin (Notebook), -f is implied. """ args = magic_arguments.parse_argstring(self.file, line) - filename = unquote_filename(args.filename) + filename = os.path.expanduser(unquote_filename(args.filename)) if os.path.exists(filename): if args.amend: