[IPython-dev] Fwd: [Matplotlib-users] Improved dashing for black and white plots?
vivainio at gmail.com
Thu Jul 13 14:01:20 EDT 2006
On 7/13/06, Walter Dörwald <walter at livinglogic.de> wrote:
> That already works (if you're using ibrowse as the output, i.e. if you
> have curses). For example try:
> ix("ls -l -R") | ifilter("_.endswith('.py')")
> This starts output right away (once it finds the first Python file).
> However if the command executed does some output it messes up the
> screen. Maybe subprocess is the solution for that?
Can't you just use normal os.popen4 to get both stdout and stderr (and
thus avoid the risk of screwing the screen?)
> What I don't know anything about is how
> ls * | grep foo
> would be turned into
> ix("ls *") | igrep("foo")
> (or something similar that is a proper Python expression).
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).
What should the input prefilter look for? Perhaps two |'s at the start
of the line, e.g.
|| ls *.exe | igrep("foo")
Would be translated to
ix("ls *.exe") | igrep("foo")
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'
More information about the IPython-dev