[IPython-dev] Fwd: [Matplotlib-users] Improved dashing for black and white plots?

Ville Vainio vivainio at gmail.com
Fri Jul 14 05:52:25 CDT 2006


On 7/14/06, Walter Dörwald <walter at livinglogic.de> wrote:

> > It shouldn't, normally. We could have an input prefilter for turning
> > the first part of the pipeline to ix(cmd) but the rest of the pipeline
> > should be explicit ipipe function invocations (i.e. normal python).
>
> How is ! handled?

It gets turned into _ip.system(cmd) python statement, which of course
executes the whole line in cell. See Extensions/ext_rescapture.py on
how to add a new input_prefilter hook.

> It would be great if shell expressions could be used in the middle of a
> pipeline. Maybe we should use backticks for that?
>
> (random.randint(0, 255) for i in xrange(256)) | isort | `uniq`

It would obviously be great in pipeline expressions (started with ||,
i.e. something starting with a system command execution) but less
obvious in arbitrary command lines like the one in your example (how
do we recognize that this is a pipeline and therefore backticks need
to be handled as system commands? )

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()?

It would make

`cat hi.txt` | isort

work but

cat hi.txt | isort

would fail (because cat is a system command and passed through normal
_ip.system() mechanism, which should still be the case).

-- 
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'


More information about the IPython-dev mailing list