[IPython-dev] Improved piping functionality (was: ...dashing for black and white...)
walter at livinglogic.de
Fri Jul 14 12:31:56 CDT 2006
Walter Dörwald wrote:
> Ville Vainio wrote:
>> 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?)
> I'll give this a try.
I just checked in a patch that changes ix() to use os.popen4(). Now you
can do e.g.:
ix("find /") | ifile
This seems to be pretty fast. Using the goto command to jump to row
10000 is practically instant. (Press "g" enter "10000" and press RETURN).
More information about the IPython-dev