test_cli.py 文件源码

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

项目:kernda 作者: maxpoint 项目源码 文件源码
def kernel_conda(kernel):
    """Run which conda in the test fixture kernel using Jupyter console."""
    jupyter = pexpect.spawn('jupyter', [
        'console',
        '--kernel', kernel.name]
    )
    jupyter.expect('In.*:')
    jupyter.sendline('!which conda')
    # input echo
    jupyter.readline()
    # path output
    path = jupyter.readline()
    jupyter.close()
    return path.decode('utf-8')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号