remote.py 文件源码

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

项目:runcommands 作者: wylee 项目源码 文件源码
def exec_command(self, client, command, timeout=None, get_pty=False, environment=None):
        channel = client._transport.open_session(timeout=timeout)
        if get_pty:
            width, height = get_terminal_size()
            channel.get_pty(width=width, height=height)
        channel.settimeout(timeout)
        if environment:
            channel.update_environment(environment)
        channel.exec_command(command)
        return channel
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号