[IPython-dev] three patches: dashes in demo; /bin/foo, ~/foo; checking returned code from the editor

Łukasz Pankowski lukpank at o2.pl
Fri Sep 19 18:21:38 EDT 2008


"Ville M. Vainio" <vivainio at gmail.com> writes:

> On Fri, Sep 19, 2008 at 3:05 PM, Łukasz Pankowski <lukpank at o2.pl> wrote:
>
>> This is a week since I'm using IPython (for now as a shell under
>> Emacs) and I really like it.  I attach three patches (for revno: 1147)
>> to the problems I have found, demo---stop---.diff is an obvious one
>> line fix that should go to 0.9 branch, the rest depend on your taste.
>
> I like these patches, they will all go in.
>
> However, regarding the editor hook patch - could you make it raise
> UsageError instead of warn, try it out a bit and send a new patch?

Ok, done.  It required catching UsageError in all three calls to
InteractiveShell.edit_syntax_error().  Otherwise UsageError would go
out of InteractiveShell.interact and show crash report or (in case of
wxIPython) out of NonBlockingIPShell._execute with traceback in the
console and unusable wxIPython shell.

NOTE: This time I left in the patch a hunk fixing no newline in
ipy_editors.py as GNU Emacs tends to require final newline in Python
mode by default and I do not want to fight with Emacs here.

>
> -- 
> Ville M. Vainio
> http://tinyurl.com/vainio

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TryNext-UsageError-if-editor-fail.diff
Type: text/x-diff
Size: 4726 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20080920/d1a95012/attachment.diff>


More information about the IPython-dev mailing list