[IPython-dev] what goes wrong with %%file
W. Trevor King
wking at tremily.us
Sun May 12 10:23:27 EDT 2013
On Sun, May 12, 2013 at 09:56:57AM -0400, Greg Wilson wrote:
> If I have a file called 'data.txt' on my hard drive, and put:
>
> %%file data.txt
>
> in a cell and then execute it, 'data.txt' is overwritten and the data is
> lost. Everyone (including me, when I'm forgetful) expects this to load
> and display the existing file content if the file exists, just like an
> editor would.
Maybe the current %%file magic should be renamed to %%save-file, and
you're expecting a (currently unimplemented?) %%open-file. I don't
like the idea of mandatory interactivity. It looks like there was
previous work in this direction (234309d, ask_yes_no on %%file
overwrite, 2012-06-05), but it was dropped in d0c569e (%%file always
overwrites, 2012-06-09). The commit message doesn't elaborate on the
motivation for dropping the interactivity.
Cheers,
Trevor
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130512/64818eff/attachment.sig>
More information about the IPython-dev
mailing list