File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ Performance Improvements
37
37
Bug Fixes
38
38
~~~~~~~~~
39
39
40
+ - Silenced a warning on some Windows environments about "tput: terminal attributes: No such device or address" when
41
+ detecting the terminal size. This fix only applies to python 3 (:issue:`16496`)
40
42
- Bug in using ``pathlib.Path`` or ``py.path.local`` objects with io functions (:issue:`16291`)
41
43
- Bug in ``DataFrame.update()`` with ``overwrite=False`` and ``NaN values`` (:issue:`15593`)
42
44
Original file line number Diff line number Diff line change 14
14
from __future__ import print_function
15
15
16
16
import os
17
+ import sys
18
+ import shutil
17
19
18
20
__all__ = ['get_terminal_size' ]
19
21
@@ -26,6 +28,10 @@ def get_terminal_size():
26
28
IPython zmq frontends, or IDLE do not run in a terminal,
27
29
"""
28
30
import platform
31
+
32
+ if sys .version_info [0 ] >= 3 :
33
+ return shutil .get_terminal_size ()
34
+
29
35
current_os = platform .system ()
30
36
tuple_xy = None
31
37
if current_os == 'Windows' :
You can’t perform that action at this time.
0 commit comments