connect.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:geekcloud 作者: Mr-Linus 项目源码 文件源码
def get_win_size():
        """
        This function use to get the size of the windows!
        ??terminal????
        """
        if 'TIOCGWINSZ' in dir(termios):
            TIOCGWINSZ = termios.TIOCGWINSZ
        else:
            TIOCGWINSZ = 1074295912L
        s = struct.pack('HHHH', 0, 0, 0, 0)
        x = fcntl.ioctl(sys.stdout.fileno(), TIOCGWINSZ, s)
        return struct.unpack('HHHH', x)[0:2]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号