Interactive scripts (back on topic for once) [was Re: The "loop and a half"]

Steve D'Aprano steve+python at pearwood.info
Fri Oct 6 08:22:04 EDT 2017


On Fri, 6 Oct 2017 11:11 pm, Paul Moore wrote:

> On 6 October 2017 at 12:42, Chris Angelico <rosuav at gmail.com> wrote:
>> Generally, you should not have to worry about the behaviour of a
>> program being drastically different if you append "| cat" to the
>> command line. Which means you don't want TOO much difference between
>> interactive mode and non-interactive mode, which in turn limits the
>> extent of these changes to the defaults. It wants to be small changes
>> only. Everything else should be controlled with options, not magic.
> 
> Yep. My real beef with ls is multi-column vs single-column.
> Paul

You don't think multiple columns in interactive mode is useful? I'm surprised,
because I find it invaluable.

I would hate for `ls` to default to printing everything in one long column. I
suppose I could define an alias, but then every time I'm on a different
computer or running as a different user, I'd end up with the annoying default
single column again.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list