
On 10/18/20, Mike Miller <python-ideas@mgmiller.net> wrote:
Also, a shell is not a terminal, so terminal routines don't feel right in shutil. Putting get_terminal_size() there was a mistake imho.
The shutil module "offers a number of high-level operations on files". ISTM that shutil.get_terminal_size is a high-level operation on sys.__stdout__, if it's a terminal/console device file, though it's an odd duck since the rest of the module is dealing with filesystem files. That said, rightly or wrongly, I think of shutil as a collection of shell utility (SHell UTILity) functions for Python's standard library, so I'm comfortable with expanding its mandate to functions commonly supported by CLI shell environments, such as terminal/console management.