[IPython-dev] (no subject)

Sjoerd de Vries sjdv1982 at gmail.com
Sun Jul 6 16:58:03 EDT 2014

Hi Thomas,

Thanks. This looks like some really interesting ideas, but I think most or
> all of it should live as an extension outside core IPython. We try to
> carefully keep the scope of IPython itself constrained, because it would be
> very easy for it to expand in a thousand directions, and I don't think this
> is a direction that the core team would use much, so consequently we
> wouldn't maintain it very well. If there are some simple hooks or something
> that IPython needs so you can extend it as you want, we can look at merging
> that, but things like the %bless magic, converters and parsing shell style
> pipelines should be in a separate project.

You might be interested to know that in older releases of IPython, there
> was a sh profile which enabled various shell-like features:
> http://ipython.org/ipython-doc/rel-0.10.2/html/interactive/shell.html .
> It was broken in the big refactoring for 0.11, although by then several of
> the extra features had been folded into IPython's default mode, but it was
> never repaired, and eventually got deleted.
> Best wishes,
> Thomas

Thank you for your response, but I am a bit sad to hear this. Now that the
sh profile is deleted, is system-shell-replacement no longer within the
scope of IPython, ?

Still, no problem... I can re-code these features as an extension:
- %bless would be registered as a separate magic by the extension
- Converters would be maintained in a separate module
- The PipeEvaluator would be maintained in a separate module
- The pipeline parser would be maintained in a separate module

In addition, the extension would manipulate
input_transformer_manager.logical_line_transforms, so that the standard
input transformers "escaped_commands" and  "assign_from_system"  will be
overruled. This is a bit rude, but it should work.

However, it would still require the following modifications to the IPython
- Support for evaluators, and the use of AliasEvaluator by %alias (to allow
delayed evaluation)
- A hook to change the %alias formatter class from DollarFormatter (to
allow customized variable substitution)
- A hook in FullEvalFormatter._vformat to be triggered on certain
"conversion" values (for converters)
- Additional optional arguments to interactiveshell methods "getoutput",
"system_piped" and "system_raw" (for variable substitution and stderr

None of this would break any existing code.
Would this be OK?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140706/b3721059/attachment.html>

More information about the IPython-dev mailing list