blob: 385127b52e7a775faf3916a0ebe994d8548332c4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
backports.shutil_get_terminal_size
==================================
A backport of the `get_terminal_size`_ function from Python 3.3's shutil.
Unlike the original version it is written in pure Python rather than C,
so it might be a tiny bit slower.
.. _get_terminal_size: https://docs.python.org/3/library/shutil.html#shutil.get_terminal_size
Example usage
-------------
>>> from backports.shutil_get_terminal_size import get_terminal_size
>>> get_terminal_size()
terminal_size(columns=105, lines=33)
|