<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi,</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sun, May 12, 2013 at 4:46 PM, Fernando Perez <span dir="ltr"><<a href="mailto:fperez.net@gmail.com" target="_blank">fperez.net@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Sun, May 12, 2013 at 4:23 PM, Brian Granger <<a href="mailto:ellisonbg@gmail.com" target="_blank">ellisonbg@gmail.com</a>> wrote:<br>
> It feels like we are trying to create a mini file editor in a notebook<br>
> cell. %%file and friends are not supposed to be that in any way. I<br>
> think %%file with prompting the user for overwrite is sufficient for<br>
> this particular purpose = write and store simple files in the<br>
> notebook.<br>
<br>
</div>No, nobody is trying to create an editor, it's just that the *name*<br>
can be improved, and that's all I think is within scope here. The<br>
function makes a (potentially destructive) action, so it should be<br>
named as a verb, much like %%load is. %%file is indeed ambiguous, and<br>
we have proven evidence of confusion, which we should take into<br>
account.<br></blockquote><div><br></div><div>I agree with Fernando that the best course of action here might be to rename `%%file` into something less ambiguous. If we go down that road, I agree that at a minimum the name should be a verb which indicates that it will write to a file. Bonus points if it also indicates that the cell contents are what will be written to the file.</div>
<div><br></div><div style>The suggested verbs I've seen so far are `save`, `write`, and `overwrite`. Each of these could then be decorated with `file` or `f` (or `cell`) to increase the specificity. Unfortunately there isn't a good shell analogue to draw from here; the closest function would be `tee` which is very unix-y and not even perfect metaphor.</div>
<div><br></div><div style>Using `%%save` is problematic because there is already a different semantic meaning associated with `%save`.</div><div style><br></div><div style>So, my vote would be for one of the following:</div>
<div style>* %%write<br></div><div style>* %%fwrite</div><div style>* %%writelines</div><div style>* %%writecell</div><div style><br></div><div style>-Brad<br></div></div></div></div>