The "loop and a half"

Michael Torrie torriem at gmail.com
Thu Oct 5 21:14:33 EDT 2017


On 10/05/2017 06:08 PM, bartc wrote:
> then it stinks. You wouldn't think much of a shell prompt that literally 
> showed nothing at all instead of something like:

Indeed many programs do go to extra effort to detect if the connecting
stream is an interactive device (a tty), and if so they do emit a prompt
and enable a REPL loop. For example the python interpreter itself does this.

However there are some fundamental commands that don't such as cat.

It all depends on what the command's purpose is for, and how it's
designed to be chained with other commands (cat for example).



More information about the Python-list mailing list