Updated get_terminal_size to check for shutil.get_terminal_size first.
Updated get_terminal_size to check for existence of shutil.get_terminal_size function first.
@@ -441,6 +441,10 @@ def dist_location(dist):
def get_terminal_size():
"""Returns a tuple (x, y) representing the width(x) and the height(x)
in characters of the terminal window."""
+ try:
+ from shutil import get_terminal_size
+ cr = get_terminal_size()
+ except:
def ioctl_GWINSZ(fd):
try:
import fcntl
