[IPython-dev] what goes wrong with %%file

Fernando Perez fperez.net at gmail.com
Tue May 14 03:25:53 EDT 2013


On Mon, May 13, 2013 at 8:55 AM, W. Trevor King <wking at tremily.us> wrote:
> On Sun, May 12, 2013 at 10:00:00PM -0700, Bradley M. Froehle wrote:
>> Using `%%save` is problematic because there is already a different
>> semantic meaning associated with `%save`.
>
> After reading over the docstrings, I'm not seeing a semantic
> difference (just cell- vs. line-magic, which is obvious from the %
> prefixes).  Can someone spell it out for me?
>
> I'm a bit sleep deprived, so apologies if I'm just being dense.

No worries, it's an artifact of history: %save was written back when
all we had was the terminal-based IPython, and it was meant as a quick
way of grabbing chunks of history and putting them out on disk.  There
was no concept of cells back then.

I think it would be perfectly reasonable to unify %save and %%file:
into a single name and implementation: the line one would write
history lines out to disk, thu>
> Cheers,
> Trevor
>
> --
> This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
s> For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
e cell one would do the same for its cell.

We just need to pick a name :)

f



More information about the IPython-dev mailing list