def terminalWidth():
    width = None
    try:
        import fcntl, termios
        cr = struct.unpack('hh', fcntl.ioctl(0, termios.TIOCGWINSZ, '1234'))
        width = int(cr[1])
    except (IOError, __HOLE__):
        pass
    return width or 80
dataset/ETHPy150Open cortesi/pry/libpry/utils.py/terminalWidth