diff options
Diffstat (limited to 'sphinx/util/console.py')
-rw-r--r-- | sphinx/util/console.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/util/console.py b/sphinx/util/console.py index a9b7ee55d..24d3e4568 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -25,7 +25,9 @@ codes = {} def get_terminal_width(): """Borrowed from the py lib.""" try: - import termios, fcntl, struct + import termios + import fcntl + import struct call = fcntl.ioctl(0, termios.TIOCGWINSZ, struct.pack('hhhh', 0, 0, 0, 0)) height, width = struct.unpack('hhhh', call)[:2] |