Closed nicoddemus closed 5 years ago
Let's use shutil.get_terminal_size if available. This produces the correct size on Windows, and seems pretty fast:
shutil.get_terminal_size
$ python -m timeit -s "import shutil" "shutil.get_terminal_size()" 100000 loops, best of 3: 14.6 usec per loop
Yes, please, this is the second thing that's bugging me! I can make a PR for this if required.
I can make a PR for this if required.
A PR would be welcome, thanks! 😁
Let's use
shutil.get_terminal_size
if available. This produces the correct size on Windows, and seems pretty fast: