Since Python 3.3, the stdlib provides the function shutil.get_terminal_size(). Now that the project has dropped Python 2
support, the compatibility shim is no longer necessary.
The stdlib version returns a named tuple. So rather than indexing "0", can use the more self-documenting attribute "columns".
Docs available at: https://docs.python.org/3/library/shutil.html#shutil.get_terminal_size
Since Python 3.3, the stdlib provides the function
shutil.get_terminal_size(). Now that the project has dropped Python 2support, the compatibility shim is no longer necessary.
The stdlib version returns a named tuple. So rather than indexing "0", can use the more self-documenting attribute "columns".
Docs available at: https://docs.python.org/3/library/shutil.html#shutil.get_terminal_size