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

MinRK benjaminrk at gmail.com
Tue May 14 14:27:52 EDT 2013


On Tue, May 14, 2013 at 12:23 AM, Fernando Perez <fperez.net at gmail.com>wrote:

> On Mon, May 13, 2013 at 8:30 AM, Brian Granger <ellisonbg at gmail.com>
> wrote:
> > I still favor %%file and adding the prompt to overwrite.
>
> We have clear evidence of repeated user confusion with this, and it's
> an ambiguous name for something that's an action (and a potentially
> destructive one, at that).  This is a case where user feedback (in
> this case collected by Greg) is showing us there's a real usability
> problem, we just need to fix it.
>

Excluding every destructive consequence mentioned so far, since the empty
cell issue is long-since addressed in master.


>
> Furthermore, making it by default interactive is going to cause all
> kinds of unexpected problems in automatically managed notebooks and
> scripts that will now block a process when they try to open a prompt.
>

That is true of all notebooks with interactive elements, what makes %%file
special?


> A rename to a verb term, along with the option of an interactive flag
> for those who clearly want that mode (and hence aren't worried about
> auto-execution) addresses cleanly both issues.
>

so if it were called `fwrite` or `writefile`, it would be okay to clobber
by default? Renaming it doesn't make it any less destructive, and
the destructive behavior is still implicit.

I don't think there's any value in a non-default interactive behavior -
either clobbering by default is fine, or it is unsafe and should be
confirmed - safety being non-default won't ever be used.

I'm fine renaming to `fwrite` without changing any behavior, if that makes
more sense than prompting for overwrite, I'm just surprised that it seems
to.


>
> Cheers,
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130514/f4100a8b/attachment.html>


More information about the IPython-dev mailing list