[IPython-User] %edit in qtconsole vs ipython

MinRK benjaminrk@gmail....
Mon Aug 1 12:33:52 CDT 2011


On Mon, Aug 1, 2011 at 09:21, Thomas Kluyver <takowl@gmail.com> wrote:
> On 1 August 2011 16:36, Brian Granger <ellisonbg@gmail.com> wrote:
>>
>> This was done on purpose in the qtconsole.  Really, %edit should
>> *just* edit (not run) even in the terminal.  We have the %run magic
>> for actually running code.  I thought we were going to chance %edit in
>> the terminal to do this.
>
> In the terminal, we assume that the editor blocks until the user exits it,
> so it's simple to know when they've finished editing. That's less reliable
> for GUI editors, although I think most do have flags that make them behave
> that way.
>
> %edit in the terminal is written with use cases in mind where you want to
> change some code and rerun it straight away. Let's not rush into changing
> that behaviour - practicality beats purity, after all.
>
> List subscribers, please let us know how you use %edit. Are you happy with
> it running edited code by default, or is that an annoyance?

Since I don't use a terminal editor, I don't use %edit too much, but
when I do it's approximately 100% of the time that I use `%edit -x
foo` to prevent the code from being run.  To my taste, switching the
default, and having `%edit -r foo` to also run the file would be
preferable.

-MinRK

>
> Thanks,
> Thomas
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>


More information about the IPython-User mailing list