<div dir="ltr">I agree with Thomas that %%overwrite won't be a natural choice when the file doesn't already exist. I think %%filesave or %%writefile would be good choices.<div><br></div><div style>- Matt</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 12, 2013 at 3:28 PM, Thomas Kluyver <span dir="ltr"><<a href="mailto:takowl@gmail.com" target="_blank">takowl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div>Not convinced by %%overwrite:<br></div>- It doesn't make much sense when the file doesn't already exist<br></div>- It should be usable the other way round as well - you know what you want to do (save some text to a file), find the quickest way to do that.<br>


<br></div>My vote would be %%writefile.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Thomas<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On 12 May 2013 22:56, Greg Wilson <span dir="ltr"><<a href="mailto:gvwilson@third-bit.com" target="_blank">gvwilson@third-bit.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 2013-05-12 5:33 PM, Fernando Perez wrote:<br>
> Mmh,  %%overwrite... I didn't like it too much when I first saw it,<br>
> but it's growing on me, and it has the advantage of being unambiguous<br>
> about the destructive nature of the action.<br>
><br>
</div>Could we do a simple usability test in the spirit of<br>
<a href="http://mail.python.org/pipermail/python-dev/2000-July/006427.html" target="_blank">http://mail.python.org/pipermail/python-dev/2000-July/006427.html</a> and<br>
<a href="http://mail.python.org/pipermail/python-dev/2000-July/006098.html" target="_blank">http://mail.python.org/pipermail/python-dev/2000-July/006098.html</a> to<br>
find out what users would expect each alternative to do? I've included a<br>
very rough first cut below (which looks better with a monospaced font :-)<br>
Thanks,<br>
Greg<br>
<br>
--------------------<br>
<br>
You have a directory called 'data' that contains two files:<br>
<br>
* 'fish.csv' contains 160 lines of observations in comma-separated<br>
   values format.<br>
* 'site.txt' contains 20 lines of text describing the site where you<br>
   collected data (in plain English).<br>
* 'weather.txt' contains half a dozen lines of text about the weather<br>
   during your site visit.<br>
<br>
You run the IPython Notebook in that directory and do the operations<br>
described below.  What does the Notebook display when each cell<br>
command is run (in the order shown, with all of the cell content typed<br>
in before the cell is run), and what changes does it make inside the<br>
'data' directory and/or the files it contains when each cell is run?<br>
<br>
1. +----------------------------------------+<br>
    |%%load fish.csv                         |<br>
    +----------------------------------------+<br>
<br>
2. +----------------------------------------+<br>
    |%%display fish.csv                      |<br>
    +----------------------------------------+<br>
<br>
3. +----------------------------------------+<br>
    |%%file site.txt                         |<br>
    +----------------------------------------+<br>
<br>
4. +----------------------------------------+<br>
    |%%file weather.txt                      |<br>
    |Generally sunny, but on the last day    |<br>
    |we had torrential rain followed by a    |<br>
    |meteorite shower.                       |<br>
    +----------------------------------------+<br>
<br>
5. +----------------------------------------+<br>
    |%%overwrite site.txt                    |<br>
    +----------------------------------------+<br>
<br>
6. +----------------------------------------+<br>
    |%%overwrite site.txt                    |<br>
    |Typical riverbank site, some signs of   |<br>
    |recent erosion due to road-building,    |<br>
    |plus traces of metallic iridium left    |<br>
    |behind by the mothership.               |<br>
    +----------------------------------------+<br>
<div><div><br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>