[IPython-dev] Improved piping functionality (was: ...dashing for black and white...)

Walter Dörwald walter at livinglogic.de
Fri Jul 14 12:39:46 EDT 2006


Fernando Perez wrote:

> [ Renaming thread so the subject is more informative ]
> 
>> Perhaps we should have a prefilter that considers "series of elements
>> separated by | where at least one is in backticks and that don't start
>> with a valid system command" as a pipeline where backticks get turned
>> to ix()?
> 
> I'd suggest trying to keep more inline with the python language, even
> at the cost of some syntactic convenience.  My experience is that
> otherwise, these rather obscure combinations of special syntax simply
> won't be used by absolutely anyone outside 2 or 3 diehards.

I can live with ix("foo") instead of `foo` (that's why I choose a short
class name).

To be able to use ix() inside a pipeline expression, there's still some
work to be done anyway: If the ix() object has an input pipe, the
strings from the input pipe must be written to the pipe's stdin.

> One of python's greatest strengths is that its working set 'fits in
> cache' very easily (cf. Perl or C++).  I think it's OK that ipython
> extends the basic language /somewhat/, but we should try to do so with
> a minimal set of easy to remember, reusable ideas.
> 
> I know this is not easy, especially because you are running into the
> design of the language itself in areas where, for this kind of usage,
> it may be less than ideal.  But that's what makes the problem
> interesting :)

So far ipipe doesn't use a prefilter hook. If ipipe ever grows one, the
basic functionality should stay usable, i.e. it should still be possible
to input the pipe expression as plain Python syntax.

Servus,
   Walter



More information about the IPython-dev mailing list