[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 08:05:25 EDT 2008


Hello

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.


demo---stop---.diff:
allow multiple dashes in `# <demo> --- stop ---' (as used in example-demo.py)

(Just s/-?/-*/ in a regexp to make docs/examples/core/example-demo.py working)


slashslash-tildeslash-prefilter.diff:
now not only ./foo but also ~/foo and /bin/foo run foo as system command

(as ~/foo and /bin/foo are not valid python even with automatic
parenthesis)


TryNext-if-editor-fail.diff:
raise TryNext if editor fails and does not execute code if all editors fail

When os.system returns non zero code the editor failed, and IMHO it
should not be left silent (for me it means emacsclient could not
connect to the server) than:
1. The next editor is tried (raising TryNext)
2. If all editors failed the code is not executed by %edit or -autoedit_syntax.


Thanks for IPython!
Łukasz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo---stop---.diff
Type: text/x-diff
Size: 453 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20080919/f9f32fd6/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slashslash-tildeslash-prefilter.diff
Type: text/x-diff
Size: 1349 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20080919/f9f32fd6/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TryNext-if-editor-fail.diff
Type: text/x-diff
Size: 2913 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20080919/f9f32fd6/attachment-0002.diff>


More information about the IPython-dev mailing list