[IPython-dev] ipipe news
Walter Dörwald
walter at livinglogic.de
Thu Mar 2 14:26:21 EST 2006
Ville Vainio wrote:
> On 3/2/06, Walter Dörwald <walter at livinglogic.de> wrote:
>
>> Unfortunately this is currently broken, but I sent a patch to Ville a
>> few minutes ago that fixes this problem.
>
> Applied.
>
> It's a shame that ibrowse doesn't work w/o curses. Could you perhaps
> implement a "stupid" version of ibrowse that dumped the table to
> screen like with just doing "ils"?
There already is "idump" as the maximally stupid Display object and
"iless", which pipes the output through less. To switch the default
display simply assign to the defaultdisplay variable:
[1]>>> from IPython.Extensions import ipipe
[2]>>> ipipe.defaultdisplay = ipipe.idump
[3]>>> igrp
[3]=== name |passwd|gid|mem
nobody | | -2|[]
nogroup | | -1|[]
wheel | | 0|['root']
...
Seems that a "\n" should be printed at the start.
And I guess it would make sense to use IPython's pager for iless,
instead of a hardcoded command line.
> Also, I'd like the output of ils and iwalk to have the filename as
> first column, that's the most important part anyway.
The output was modelled after the "ls -l" output. I guess the output in
"ls -l" is done this way because the filename is the only variable
length part.
Switching the output format for ils/iwalk/iglob is simple: Just change
ifile.__xattrs__(). Maybe we should put the default attributes into a
class attribute, so that everybody can choose his/her own file listing
format?
Servus,
Walter
More information about the IPython-dev
mailing list