Commit 483f31d
committed
Use portable library functions in getscrwidth()
Since Python 3.3 the library function os.get_terminal_size() is available,
which is more portable and makes directly using ioctl unnecessary.
We explicitly do not use shutil.get_terminal_size() to preserve the current
logic and avoid using sys.__stdout__ which makes testing harder.1 parent 79c075f commit 483f31d
1 file changed
+10
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
10 | 8 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
22 | 15 | | |
23 | | - | |
24 | | - | |
| 16 | + | |
| 17 | + | |
25 | 18 | | |
26 | 19 | | |
27 | 20 | | |
| |||
0 commit comments