[IPython-dev] ipipe news
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.
> 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:
>>> from IPython.Extensions import ipipe
>>> ipipe.defaultdisplay = ipipe.idump
=== 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
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
More information about the IPython-dev